vue项目的一些配置
1.关闭语法检查
- 创建 vue.config.js 文件
-
module.exports = { // 关闭eslint 关闭语法检查 lintOnSave: false }
2.自动运行到浏览器
- 打开package.json文件
-
"scripts" : { //运行时自动打开浏览器 --open "serve" : "vue-cli-service serve --open" , "build" : "vue-cli-service build" , "lint" : "vue-cli-service lint" },
3. src文件夹简写,配置别名@
- 创建jsconfig.json文件
-
{ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": [ "./src/*" ], } }, //@符不在node_modules dist 中使用 "exclude": [ "node_modules", "dist" ] }

浙公网安备 33010602011771号