{ "compilerOptions": { // 将每个文件作为单独的模块 "isolatedModules": true, // 指定ECMAScript目标版本 "target": "esnext", // 指定生成哪个模块系统代码 "module": "esnext", // 决定如何处理模块。 "moduleResolution": "node", // 决定如何处理模块。 // 启用 --strict相当于启用 --noImplicitAny, --noImplicitThis, --alwaysStrict, // --strictNullChecks和 --strictFunctionTypes和--strictPropertyInitialization。 "strict": true, "noLib": false, "forceConsistentCasingInFileNames": true, // 允许从没有设置默认导出的模块中默认导入。这并不影响代码的输出,仅为了类型检查。 "allowSyntheticDefaultImports": true, "strictFunctionTypes": false, // 支持jsx语法 "jsx": "preserve", "allowJs": true, "checkJs": false, // 生成相应的 .map文件。 "sourceMap": true, "esModuleInterop": true, "resolveJsonModule": true, // 若有未使用的局部变量则抛错。 "noUnusedLocals": false, "noUnusedParameters": true, "experimentalDecorators": true, "lib": ["dom", "esnext", "DOM.Iterable"], //关闭implicitly has an 'any' type "noImplicitAny": false, // 忽略所有的声明文件( *.d.ts)的类型检查。 "skipLibCheck": true, // 要包含的类型声明文件名列表 "types": ["vite/client", "element-plus/global"], "removeComments": true, // 解析非相对模块名的基准目录 "baseUrl": "./", // 要包含的类型声明文件名列表 "paths": { "@/*": ["src/*"], "/@/*": ["src/*"], "#/*": ["src/types/*"], "/#/*": ["src/types/*"] }, "outDir": "./" }, "include": [ "src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "vite.config.ts", "auto-imports.d.ts", "components.d.ts", "src/api/article/article.js" ], "exclude": ["node_modules", "dist", ".vscode", ".idea"] }