chore: ts 配置
This commit is contained in:
parent
653cfdf8ba
commit
09f941a7b7
@ -5,8 +5,12 @@
|
|||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
|
/** ts 严格模式 */
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
|
"importHelpers": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
/** https://vitejs.cn/guide/features.html#typescript-compiler-options */
|
/** https://vitejs.cn/guide/features.html#typescript-compiler-options */
|
||||||
@ -17,12 +21,19 @@
|
|||||||
"dom"
|
"dom"
|
||||||
],
|
],
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"types": ["vite/client"],
|
"types": [
|
||||||
|
"node",
|
||||||
|
"vite/client",
|
||||||
|
/** element-plus 的 volar 插件支持 */
|
||||||
|
// "element-plus/global"
|
||||||
|
],
|
||||||
/** baseUrl 用来告诉编译器到哪里去查找模块,使用非相对模块时必须配置此项 */
|
/** baseUrl 用来告诉编译器到哪里去查找模块,使用非相对模块时必须配置此项 */
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
// 非相对模块导入的路径映射配置,根据 baseUrl 配置进行路径计算
|
/** 非相对模块导入的路径映射配置,根据 baseUrl 配置进行路径计算 */
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"]
|
"@/*": [
|
||||||
|
"src/*"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
@ -30,6 +41,12 @@
|
|||||||
"src/**/*.d.ts",
|
"src/**/*.d.ts",
|
||||||
"src/**/*.tsx",
|
"src/**/*.tsx",
|
||||||
"src/**/*.vue",
|
"src/**/*.vue",
|
||||||
|
"types/**/*.d.ts",
|
||||||
"vite.config.ts"
|
"vite.config.ts"
|
||||||
|
],
|
||||||
|
/** 编译器默认排除的编译文件 */
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"dist"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user