1.1 项目运行的时候,让浏览器自动打开
"scripts": {
"serve": "vue-cli-service serve", --> "serve后面 --open --host --port ",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
1.2 eslint校验功能的关闭
比如:声明变量但是没有使用,eslint校验工具报错。
---在根目录下,创建一个vue.config.js
在vue.config.js文件中
加上:
module.exports = {
//关闭eslint
lintOnSave:false
}
1.3 src文件夹简写方法,配置别名
jsconfig.json配置别名@提示[@代表的是src文件夹,这样将来文件过多,找的时候方便很多]
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": ["src/*"]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"exclude": [ //exclude:不包括,把...排除在外. @不能在exclude里的文件夹中使用
"node_modules",
"dist"
]
}