使用Vite 创建一个新的vue3项目
npm init vite
Need to install the following packages:
create-vite
Ok to proceed? (y) y
✔ Project name: … vue3_vite //项目名称
✔ Select a framework: › vue //选择vue
✔ Select a variant: › vue
cd vue3_vite //进入目录
npm install //安装依赖
npm run dev //运行项目
引入TS
vue add typescrpit
运行完成后可能会报错
这个时候需要执行
npm install --save-dev @vue/cli-service
然后重新 vue add typescrpit 然后就好了