chore: 精简 tsconfig
This commit is contained in:
parent
84233e5ba6
commit
45bcc0545a
@ -1,48 +1,30 @@
|
|||||||
|
// https://cn.vuejs.org/guide/typescript/overview.html#configuring-tsconfig-json
|
||||||
|
// https://cn.vitejs.dev/guide/features.html#typescript-compiler-options
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "esnext",
|
"target": "esnext",
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"jsxImportSource": "vue",
|
"jsxImportSource": "vue",
|
||||||
"lib": ["esnext", "dom"],
|
"lib": ["esnext", "dom"],
|
||||||
/** https://cn.vitejs.dev/guide/features.html#typescript-compiler-options */
|
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
/** baseUrl 用来告诉编译器到哪里去查找模块,使用非相对模块时必须配置此项 */
|
// baseUrl 用来告诉编译器到哪里去查找模块,使用非相对模块时必须配置此项
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
/** 非相对模块导入的路径映射配置,根据 baseUrl 配置进行路径计算 */
|
// 非相对模块导入的路径映射配置,根据 baseUrl 配置进行路径计算
|
||||||
"paths": {
|
"paths": { "@/*": ["src/*"] },
|
||||||
"@/*": ["src/*"]
|
|
||||||
},
|
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"types": [
|
"types": ["vite/client", "element-plus/global"],
|
||||||
"node",
|
// TS 严格模式
|
||||||
"vite/client",
|
|
||||||
/** Element Plus 的 Volar 插件支持 */
|
|
||||||
"element-plus/global",
|
|
||||||
"vitest"
|
|
||||||
],
|
|
||||||
/** TS 严格模式 */
|
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
/** https://cn.vitejs.dev/guide/features.html#typescript-compiler-options */
|
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"skipLibCheck": true
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"include": [
|
// 编译器默认排除的编译文件
|
||||||
"src/**/*.ts",
|
|
||||||
"src/**/*.d.ts",
|
|
||||||
"src/**/*.tsx",
|
|
||||||
"src/**/*.vue",
|
|
||||||
"tests/**/*.ts",
|
|
||||||
"types/**/*.d.ts",
|
|
||||||
"vite.config.ts",
|
|
||||||
"vitest.config.ts"
|
|
||||||
],
|
|
||||||
/** 编译器默认排除的编译文件 */
|
|
||||||
"exclude": ["node_modules", "dist"]
|
"exclude": ["node_modules", "dist"]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user