Vue创建项目配置情况

发布时间:2024年01月16日

刚开始接触vue项目创建和运行因为node版本和插件版本不一致时长遇到刚装好插件,项目就跑不起来的情况,特此记录一下

vue -V

@vue/cli 5.0.8

node -v

v12.22.12

npm -v

6.14.16

关闭驼峰命名检查、未使用语法检查?

package.json文件内容:?

{
  "name": "vmall-project",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "axios": "^1.6.5",
    "core-js": "^3.8.3",
    "swiper": "^5.4.5",
    "vant": "^2.13.2",
    "vee-validate": "^2.2.15",
    "vue": "^2.6.14",
    "vue-router": "^3.6.5",
    "vuex": "^4.1.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.16",
    "@babel/eslint-parser": "^7.12.16",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-plugin-eslint": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "eslint": "^7.32.0",
    "eslint-plugin-vue": "^8.0.3",
    "unplugin-auto-import": "^0.7.2",
    "unplugin-vue-components": "^0.19.0",
    "vue-template-compiler": "^2.6.14"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "@babel/eslint-parser"
    },
    "rules": {
      "vue/multi-word-component-names": "off",
      "no-unused-vars": "off"
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}

后续会不断更新完善......

文章来源:https://blog.csdn.net/RreamigOfGirls/article/details/135625176
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。