npm下载
依赖包下载到package.json,dependencies(开发和生产环境都可用,如vue,axios,vue-router)
npm install axios --save
依赖下载到package.json,devDependencies中(仅在开发环境中使用)
npm install axios -D
// 指定版本号
npm i -D sass-loader@12.0.0
"dependencies": {
"axios": "^0.26.1",
"core-js": "^3.8.3",
"element-plus": "^2.1.10",
"mime": "^3.0.0",
"net": "^1.0.2",
"nprogress": "^0.2.0",
"pinia": "^2.0.14",
"qs": "^6.10.5",
"sockjs-client": "^1.6.1",
"stompjs": "^2.3.3",
"vue": "^3.2.37",
"vue-router": "^4.0.15",
"vue3-seamless-scroll": "^1.2.0"
},
"devDependencies": {
"@types/sockjs-client": "^1.5.1",
"@types/stompjs": "^2.3.5",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@vue/cli-plugin-babel": "~5.0.0",
}