tsconfig.json 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {
  2. "compilerOptions": {
  3. // 允许从没有设置默认导出的模块中默认导入。这并不影响代码的输出,仅为了类型检查。
  4. "allowSyntheticDefaultImports": true,
  5. // 解析非相对模块名的基准目录
  6. "baseUrl": ".",
  7. "esModuleInterop": true,
  8. // 从 tslib 导入辅助工具函数(比如 __extends, __rest等)
  9. "importHelpers": true,
  10. // 指定生成哪个模块系统代码
  11. "module": "esnext",
  12. // 决定如何处理模块。
  13. "moduleResolution": "node",
  14. // 启用所有严格类型检查选项。
  15. // 启用 --strict相当于启用 --noImplicitAny, --noImplicitThis, --alwaysStrict,
  16. // --strictNullChecks和 --strictFunctionTypes和--strictPropertyInitialization。
  17. "strict": true,
  18. "noImplicitAny": false, //关闭implicitly has an 'any' type
  19. // 支持jsx语法
  20. "jsx": "preserve",
  21. // 生成相应的 .map文件。
  22. "sourceMap": true,
  23. // 忽略所有的声明文件( *.d.ts)的类型检查。
  24. "skipLibCheck": true,
  25. // 指定ECMAScript目标版本
  26. "target": "esnext",
  27. // 要包含的类型声明文件名列表
  28. "types": [
  29. "node"
  30. ],
  31. "typeRoots": [
  32. "../node_modules/@types"
  33. ],
  34. "isolatedModules": true,
  35. // 模块名到基于 baseUrl的路径映射的列表。
  36. "paths": {
  37. "@/*": [
  38. "src/*"
  39. ]
  40. },
  41. "vueCompilerOptions": {
  42. "experimentalDisableTemplateSupport": true //去掉volar下el标签红色波浪线问题
  43. },
  44. // 编译过程中需要引入的库文件的列表。
  45. "lib": [
  46. "ESNext",
  47. "DOM",
  48. "DOM.Iterable",
  49. "ScriptHost"
  50. ]
  51. },
  52. // 解析的文件
  53. "include": [
  54. "src/**/*.ts",
  55. "src/**/*.d.ts",
  56. "src/**/*.tsx",
  57. "src/**/*.vue",
  58. "src/*.js",
  59. "src/**/*.jsx",
  60. ],
  61. "exclude": [
  62. "node_modules"
  63. ],
  64. "references": [
  65. {
  66. "path": "./tsconfig.json"
  67. }
  68. ]
  69. }