mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-22 03:49:19 +08:00
31 lines
1.0 KiB
JSON
31 lines
1.0 KiB
JSON
// https://cn.vuejs.org/guide/typescript/overview.html#configuring-tsconfig-json
|
|
// https://cn.vitejs.dev/guide/features.html#typescript-compiler-options
|
|
{
|
|
"compilerOptions": {
|
|
"target": "esnext",
|
|
"jsx": "preserve",
|
|
"jsxImportSource": "vue",
|
|
"lib": ["esnext", "dom"],
|
|
"useDefineForClassFields": true,
|
|
"experimentalDecorators": true,
|
|
// baseUrl 用来告诉编译器到哪里去查找模块,使用非相对模块时必须配置此项
|
|
"baseUrl": ".",
|
|
"module": "esnext",
|
|
"moduleResolution": "bundler",
|
|
// 非相对模块导入的路径映射配置,根据 baseUrl 配置进行路径计算
|
|
"paths": { "@/*": ["src/*"] },
|
|
"resolveJsonModule": true,
|
|
"types": ["vite/client", "element-plus/global"],
|
|
// TS 严格模式
|
|
"strict": true,
|
|
"importHelpers": true,
|
|
"sourceMap": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"esModuleInterop": true,
|
|
"isolatedModules": true,
|
|
"skipLibCheck": true
|
|
},
|
|
// 编译器默认排除的编译文件
|
|
"exclude": ["node_modules", "dist"]
|
|
}
|