如何让vue项目在我们更新了代码以后,自动跑起来更新视图?
只用在vue.config.js文件中加入如下代码就可以轻松解决
如图:
代码如下 :
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
devServer: {
host: 'localhost',
open: 'true',
port: 3000
},
lintOnSave: false //关闭eslint : 规范取名,代码风格校验
})