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"
      ]
    }
    

      

posted @ 2022-05-06 15:41  lin-1  阅读(57)  评论(0)    收藏  举报