💥 Important!!! The old template
cli-2.x
andcli@4.x
are archived,please check the guide below.
- If you use
vue@2.x
andvue-cli@2.x
,please check branch cli-2.x - If you use
vue@2.6.12
andvue-cli@4.x
,please check branch vue2.6.12_base_on_vue-cli@4.x
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
TypeScript cannot handle type information for .vue
imports by default, so we replace the tsc
CLI with vue-tsc
for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue
types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensions
from VSCode's command palette - Find
TypeScript and JavaScript Language Features
, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Window
from the command palette.
- 约束镜像源和
npm、node、pnpm
版本 - 仅允许使用
pnpm
-
Eslint
+prettier
ready -
vite
配置拆分 - 集成
tailwindcss
- 构建
gzip
- 多构建环境区分
- 目录分层
-
TS
支持 -
html
支持env变量
- 支持三方包拆分到独自的
chunk
中 - 主题化
-
svg
集成 -
vueuse
集成 -
TSX
支持 -
Vue3API自动导入
支持 - 深色模式支持
-
Inspect调试
支持 - 组件模板生成/移除
-
i18n
支持 - 支持
event-bus
(基于EventEmitter3
) - 自定义
import语句
顺序 - 支持
CI构建
,可通过pnpm build:prod -- --ciVersion 1.1.1
添加构建版本号 -
swagger
转ts类型文件
并自动生成request文件