兼容性注意
Vite 需要 Node.js 版本 >= 12.0.0。
1、使用npm 安装Viter
$ npm init vite@latest
使用npm 初始化项目
# npm 6.x
npm init vite@latest my-vue-app --template vue
# npm 7+, 需要额外的双横线:
npm init vite@latest my-vue-app -- --template vue
2、配置路由:
npm install vue-router@4 --save
3、配置网络请求:
npm i axios --save