1. 安装路由
npm i vue-router@next -D
2.安装Vuex
npm i vuex@next -D
3.安装sass
npm i -D sass
4.vscode 支持 eslint
npm install --save-dev eslint eslint-loader babel-eslint eslint-friendly-formatter eslint-config-standard eslint-plugin-standard eslint-plugin-promise eslint-plugin-import eslint-plugin-node eslint-plugin-html eslint-config-airbnb-base
5.安装mockjs
npm i -D mockjs
6.安装axios
npm i -D axios
package.json 配置文件
{ "name": "vue3-vite", "version": "0.0.0", "scripts": { "dev": "vite", "build": "vite build" }, "dependencies": { "vue": "^3.0.0-rc.1" }, "devDependencies": { "@vue/compiler-sfc": "^3.0.0-rc.1", "axios": "^0.20.0", "babel-eslint": "^10.1.0", "eslint": "^7.9.0", "eslint-config-airbnb-base": "^14.2.0", "eslint-config-standard": "^14.1.1", "eslint-friendly-formatter": "^4.0.1", "eslint-loader": "^4.0.2", "eslint-plugin-html": "^6.1.0", "eslint-plugin-import": "^2.22.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", "mockjs": "^1.1.0", "sass": "^1.26.11", "vite": "^1.0.0-rc.1", "vue-router": "^4.0.0-beta.11", "vuex": "^4.0.0-beta.4" } }