tsconfig.json 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {
  2. "compilerOptions": {
  3. "target": "esnext",
  4. /** https://cn.vitejs.dev/guide/features.html#typescript-compiler-options */
  5. "useDefineForClassFields": true,
  6. "module": "esnext",
  7. "moduleResolution": "bundler",
  8. /** TS 严格模式 */
  9. "strict": true,
  10. "jsx": "preserve",
  11. "jsxImportSource": "vue",
  12. "importHelpers": true,
  13. "noImplicitAny": false,
  14. "experimentalDecorators": true,
  15. "allowSyntheticDefaultImports": true,
  16. "sourceMap": true,
  17. "resolveJsonModule": true,
  18. /** https://cn.vitejs.dev/guide/features.html#typescript-compiler-options */
  19. "isolatedModules": true,
  20. "esModuleInterop": true,
  21. "lib": ["esnext", "dom"],
  22. "skipLibCheck": true,
  23. "types": [
  24. "node",
  25. "vite/client",
  26. /** Element Plus 的 Volar 插件支持 */
  27. "element-plus/global"
  28. ],
  29. /** baseUrl 用来告诉编译器到哪里去查找模块,使用非相对模块时必须配置此项 */
  30. "baseUrl": ".",
  31. /** 非相对模块导入的路径映射配置,根据 baseUrl 配置进行路径计算 */
  32. "paths": {
  33. "@/*": ["src/*"]
  34. }
  35. },
  36. "include": [
  37. "script/**/*.ts",
  38. "src/**/*.ts",
  39. "src/**/*.d.ts",
  40. "src/**/*.tsx",
  41. "src/**/*.vue",
  42. "types/**/*.d.ts",
  43. "vite.config.mts"
  44. ],
  45. /** 编译器默认排除的编译文件 */
  46. "exclude": ["node_modules", "dist", "release"]
  47. }