This commit is contained in:
2026-11-29 08:33:05 +08:00
parent 6377409adc
commit 853c947a25
4 changed files with 106 additions and 15 deletions
+5 -3
View File
@@ -9,10 +9,12 @@
"module": "esnext",
// 所有项目必须开,兼容 es 和 cjs 导入,允许 import React from 'react' ,而非 import * as React 。
"esModuleInterop": true,
// 允许导入 ts,tsx 扩展名,include 里可以省略后缀。
// 允许导入 ts,tsx 扩展名。
"allowImportingTsExtensions": true,
// 允许 js,jsx 扩展名,include 里可以省略后缀。
// 允许导入 js,jsx 扩展名。
"allowJs": true,
// 允许导入 json 模块,而不只是 ts,js,css 。
"resolveJsonModule": true,
// 启用装饰器,也就是 @XXX 注解。
"experimentalDecorators": true,
// 发射装饰器元数据。
@@ -37,7 +39,7 @@
"incremental": true
},
// 本配置文件的作用范围,包含根目录下的一切文件,包括 vite.config.ts 等配置文件
"include": ["**/*.ts",],
"include": ["**/*.ts", "*/*.tsx"],
// 本配置文件排除的范围。
"exclude": [
"node_modules",