话不多说,先上图:
当然,这里的警告我是知道怎么回事,原来eslint是一个语法检查工具,但是限制很严格,在我的vue文件里面很多空格都会导致红线警告(可以屏蔽),虽然可以屏蔽,但是在编译的时候老是会跳出来一堆警告出来,所以能完全关闭语法的限制是最好的了。
关闭方法:
在build/webpack.base.conf.js文件中,注释或者删除掉:module->rules中有关eslint的规则:
module: {
rules: [
//...(config.dev.useEslint ? [createLintingRule()] : []), // 注释或者删除
{
test: /.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
...
}
]
}