webpack 4.0需要手动开启热加载
1. 安装
yarn add webpack-dev-server --dev
2.配置 vue.config.js
module.exports = {
devSserver : {
compress : true,
disableHostCheck : true, }
}
3. 修改 package.json
"serve" : "vue-cli-service serve && webpack-dev-server --open"
4. 重启