# vue3-vite-js-template **Repository Path**: xiukun007/vue3-vite-js-template ## Basic Information - **Project Name**: vue3-vite-js-template - **Description**: Vue3 Vite Javascript 模板 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-04 - **Last Updated**: 2022-03-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 使用 ---------------------------- - ### Vite构建 ``` #npm 6.x npm init @vitejs/app my-vue-app --template vue # npm 7+, 需要额外的双横线: npm init @vitejs/app my-vue-app -- --template vue # yarn yarn create @vitejs/app my-vue-app --template vue ``` - ### Vite插件 ``` yarn add -D @vitejs/plugin-legacy 类似polyfill低版本兼容 yarn add -D @vitejs/plugin-vue-jsx 支持在vue页面中写jsx yarn add -D mockjs vite-plugin-mock 配置mock yarn add vue-router@4 vuex@next axios dayjs yarn add element-plus normalize.css yarn add -D vite-plugin-style-import 按需引用element-plus yarn add -D prettier 格式美化 yarn add -D babel-eslint eslint eslint-plugin-prettier eslint-config-prettier eslint-plugin-vue 校验 yarn add -D husky-init husky ## npx husky install 运行生成.husky文件夹 yarn add -D lint-staged -------------- git config --global core.autocrlf false ###关闭警告 ```