MeterSphere/frontend/tsconfig.json

51 lines
1.2 KiB
JSON
Raw Normal View History

2023-05-24 11:08:08 +08:00
{
"include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue",
"src/components.d.ts",
"auto-imports.d.ts",
"types/**/*.d.ts",
"types/**/*.ts",
"build/**/*.ts",
"build/**/*.d.ts",
"mock/**/*.ts",
], // TS解析路径配置
"exclude": [
"node_modules"
],
"compilerOptions": {
"allowJs": true, // 允许编译器编译JSJSX文件
"noEmit": true,
"target": "esnext", // 使用es最新语法
"useDefineForClassFields": true,
"allowSyntheticDefaultImports": true, // 允许异步导入模块,配合自动导入插件使用
"module": "esnext", // 使用ES模块语法
"moduleResolution": "node",
"strict": true, // 严格模式
"jsx": "preserve",
"sourceMap": true, // 代码映射
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": [
"esnext",
"dom"
],
"skipLibCheck": true, // 跳过node依赖包语法检查
"types": [
// "vitest/globals",
// "vite-plugin-svg-icons/client"
], // 手动导入TS类型声明文件
"baseUrl": ".",
"paths": { // 路径映射
"@/*": [
"./src/*"
],
"#/*": [
"types/*"
]
}
},
}