mm
This commit is contained in:
@@ -1,26 +1,12 @@
|
||||
{
|
||||
// tsconfig.base.json,用于被 tesconfig.json 和 tesconfig.build.json 继承
|
||||
"compilerOptions": {
|
||||
// 输出模块语法,使用版本号最新的那个,而不是实验性语法 ESNext
|
||||
"module": "es2022",
|
||||
|
||||
// 模块解析策略,模拟 Vite / Rollup / webpack,支持 exports / imports,不强制 Node ESM 的严格规则
|
||||
"moduleResolution": "bundler",
|
||||
|
||||
// 显式声明使用的类型包
|
||||
"types": ["node", "react"],
|
||||
|
||||
// 允许 ESM 导入 CJS
|
||||
"lib": ["ES2025", "DOM", "DOM.Iterable"],
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
|
||||
// 跳过 node_modules 类型检查,加快构建,避免第三方类型污染
|
||||
"skipLibCheck": true,
|
||||
|
||||
/**
|
||||
* 只做类型检查,不生成 JS 输出
|
||||
* - 适用于 Vite / Next / Nuxt 等 bundler 场景
|
||||
* - 防止 tsc 与构建工具重复 emit
|
||||
*/
|
||||
"noEmit": true
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user