Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-29 07:19:19 +08:00

perf: 减少 tsc noEmit 配置硬编码

This commit is contained in:
pany 2024-12-13 19:01:50 +08:00
parent 1fa9d8c1f7
commit 5aa09b05db
3 changed files with 7 additions and 3 deletions

@ -1,4 +1,4 @@
# 全局 ts 类型检查(此操作会增加 git commit 时长)
npx vue-tsc --noEmit
npx vue-tsc
# 执行 lint-staged 中配置的任务
npx lint-staged

@ -7,8 +7,8 @@
"repository": "https://github.com/un-pany/v3-admin-vite",
"scripts": {
"dev": "vite",
"build:staging": "vue-tsc --noEmit && vite build --mode staging",
"build": "vue-tsc --noEmit && vite build",
"build:staging": "vue-tsc && vite build --mode staging",
"build": "vue-tsc && vite build",
"preview": "vite preview",
"lint": "eslint . --fix",
"prepare": "husky",

@ -23,11 +23,15 @@
},
"resolveJsonModule": true,
"types": ["vite/client", "element-plus/global"],
// .ts .mts .tsx
"allowImportingTsExtensions": true,
// JS
"allowJs": true,
// TS
"strict": true,
"importHelpers": true,
//
"noEmit": true,
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,