tsconfig.json 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. "experimentalDecorators": true,
  14. "allowSyntheticDefaultImports": true,
  15. "sourceMap": true,
  16. "resolveJsonModule": true,
  17. /** https://cn.vitejs.dev/guide/features.html#typescript-compiler-options */
  18. "isolatedModules": true,
  19. "esModuleInterop": true,
  20. "lib": ["esnext", "dom"],
  21. "skipLibCheck": true,
  22. "types": [
  23. "node",
  24. "vite/client",
  25. /** Element Plus 的 Volar 插件支持 */
  26. "element-plus/global",
  27. "vitest"
  28. ],
  29. /** baseUrl 用来告诉编译器到哪里去查找模块,使用非相对模块时必须配置此项 */
  30. "baseUrl": ".",
  31. /** 非相对模块导入的路径映射配置,根据 baseUrl 配置进行路径计算 */
  32. "paths": {
  33. "@/*": ["src/*"]
  34. }
  35. },
  36. "include": [
  37. "src/**/*.ts",
  38. "src/**/*.d.ts",
  39. "src/**/*.tsx",
  40. "src/**/*.vue",
  41. "tests/**/*.ts",
  42. "types/**/*.d.ts",
  43. "vite.config.ts",
  44. "vitest.config.ts"
  45. ],
  46. /** 编译器默认排除的编译文件 */
  47. "exclude": ["node_modules", "dist"]
  48. }