# vite-demo **Repository Path**: falanter/vite-demo ## Basic Information - **Project Name**: vite-demo - **Description**: vite的学习和实践 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-05-16 - **Last Updated**: 2022-06-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Vue 3 + TypeScript + Vite ## node ``` node v16.15.0 npm v8.5.5 ``` ## 安装 ``` //npm 6.x npm init vite@latest my-vue-app --template vue-ts //npm 7+(该项目使用) npm init vite@latest my-vue-app -- --template vue-ts cd my-vue-app npm install //element-plus //npm install element-plus --save ``` ## 运行 ``` npm start || npm run dev ``` ## 技术栈 ``` vite vue3 typeScript vue-router vuex less element-plus (https://element-plus.org/zh-CN/component/button.html) axios ``` ## 本地接口使用(用于axios测试) ``` npm install express -D npm install cors -D npm install qs // 前端obj转键值对 npm install @types/qs // 转ts 在src/server目录下运行 node express //get接口:http://localhost:8000/api/get ``` ## 兼容 ``` 没有vite.config.js 无法兼容ie vue3不支持ie11 ``` ## 待使用 ``` Ant Design Vue (https://www.antdv.com/docs/vue/getting-started-cn) sass => sass分支使用 ``` ## 打包后码云部署白屏 ``` vite.config.ts export default defineConfig({ base:'./' }) ``` https://www.psvmc.cn/article/2022-03-02-vue3-start.html # Vue 3 + TypeScript + Vite This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `