{ // 定义项目中包含的文件列表 "files": [], // 定义项目中引用的其他配置文件 "references": [ { "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" } ], // 设置编译器选项 "compilerOptions": { // 定义类型根目录,用于指定在哪里查找类型定义文件 "typeRoots": ["./node_modules/@types", "./src/types"], // 设置JavaScript代码生成的目标版本 "target": "ES2020", // 使用定义字段时生成定义属性 "useDefineForClassFields": true, // 设置模块系统的类型 "module": "ESNext", // 指定要包含的库 "lib": ["ES2020","DOM","DOM.Iterable"], // 跳过对库的类型检查 "skipLibCheck": true, // 设置模块解析策略 "moduleResolution": "bundler", // 允许从具有默认导出的模块中进行默认导入 "allowSyntheticDefaultImports": true, // 允许导入JSON模块 "resolveJsonModule": true, // 将每个文件作为独立的模块对待 "isolatedModules": true, // 不生成任何输出文件 "noEmit": true, // 保留JSX语法 "jsx": "preserve", // 启用严格类型检查 "strict": false, // 警告未使用的局部变量 "noUnusedLocals": true, // 警告未使用的参数 "noUnusedParameters": true, // 在switch语句中禁止fallthrough行为 "noFallthroughCasesInSwitch": true, // 设置基础目录 "baseUrl": ".", // 设置路径映射 "paths": { "@/*": ["./src/*"] } }, // 指定要包含在编译中的文件 "include": ["./src/**/*.ts", "./src/**/*.d.ts", "./src/**/*.tsx", "./src/**/*.vue"] }