运行项目后自动浏览器打开配置:

在packages.json 文件中
   "scripts": {
        "serve": "vue-cli-service serve --open",
        "build": "vue-cli-service build"
    }

serve 添加 --open

 关闭eslint:

在项目根目录下新建vue.config.js文件
module.exports = {
// 关闭eslint
lintOnSave:false
}

 为src设置别名,避免../../../src 的出现:

在项目根路径新建jsconfig.json文件

// 设置别名
{
  "compilerOptions": {
    "baseUrl": "./",
    "paths": {
      "@/*": [
        "src/*"
      ]
    }
  },
  "exclude": [
    "node_modules",
    "dist"
  ]
}

 

相关文章:

  • 2021-06-22
  • 2022-12-23
  • 2021-05-02
  • 2021-04-19
  • 2021-05-06
  • 2021-05-07
猜你喜欢
  • 2021-04-18
  • 2021-07-21
  • 2021-12-03
  • 2022-12-23
  • 2021-12-07
  • 2021-07-02
  • 2021-10-12
相关资源
相似解决方案