{
"name": "hello-world4.5.15",//项目名称
"version": "0.1.0",//当前版本号
"private": true,//私有
"scripts": {//运行指令配置,npm run *
//开发环境:--open运行后直接打开浏览器,也可以在vue.config.js的devServer.open=true
"serve": "vue-cli-service serve --open",
//--modern现代模式:有了 Babel 我们可以兼顾所有最新的
//ES2015+ 语言特性,但也意味着我们需要交付转译和 polyfill 后的包以支持旧浏览器。
//这些转译后的包通常都比原生的 ES2015+ 代码会更冗长,运行更慢。现如今绝大多数现代浏览器都已经支持了原生的 ES2015,
//所以因为要支持更老的浏览器而为它们交付笨重的代码是一种浪费。
"build": "vue-cli-service build --modern",
"lint": "vue-cli-service lint",//如果要自动修复或忽略某些报错继续执行,在其后加上 eslint --fix
"server": "nodemon server/index.js"//nodemon 监听node变化,自动更新
},
"dependencies": {//开发和生产必须的
"axios": "^0.24.0",//需要自己下载
"core-js": "^3.19.1",
"crypto-js": "^4.1.1",//需要自己下载//密码加密
"element-ui": "^2.15.6",//需要自己下载//前端框架
"js-cookie": "^3.0.1",//需要自己下载,//cookie
"jsonwebtoken": "^8.5.1",//需要自己下载,token
"sass": "^1.26.5",//需要自己下载//使用sass整理
"sass-loader": "^8.0.2",//需要自己下载
"vue": "^2.6.14",
"vue-router": "^3.2.0",//需要自己下载,//vue路由
"vuex": "^3.4.0"//需要自己下载,//状态管理器
},
"devDependencies": {//开发依赖
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.8.0",
"eslint-plugin-vue": "^6.2.2",
"mysql": "^2.18.1",//需要自己下载,//sql
"nodemon": "^2.0.13",//需要自己下载,//node自动执行更新
"vue-template-compiler": "^2.6.14"
},
"eslintConfig":{} ,//eslint的配置,我这里把配置写到.eslintrc.js
"browserslist": [// 指定兼容的浏览器
"> 1%",
"last 2 versions",
"not dead"
]
}
2021-11-03 vuecli2 的 package.json文件配置说明
最新推荐文章于 2024-09-19 16:18:48 发布