-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsconfig.json
More file actions
28 lines (28 loc) · 1.53 KB
/
Copy pathtsconfig.json
File metadata and controls
28 lines (28 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
"compilerOptions": {
"importHelpers": true,
"outDir": "./dist/", // 打包后的目录
"sourceMap": true, // 输出 Source Map 方便调试
"target": "ESNEXT", // 指定输出 ECMAScript 版本,默认为 es5
"module": "Commonjs", // 指定输出模块规范,默认为 Commonjs
"lib": ["ESNext", "DOM"], // 编译需要包含的 API,默认为 target 的默认值
// "noEmit": true, // 不输出文件,只做类型检查
"declaration": true, // 将生成.d.ts文件
"declarationDir": "dist/types", // .d.ts 类型文件的输出目录,默认为 outDir 目录
"strict": true, // 启用所有严格的类型检查选项,默认为 true
/*当目标是ES5或ES3的时候提供对for-of、扩展运算符和解构赋值中对于迭代器的完整支持*/
"downlevelIteration": true,
"baseUrl": ".", // 模块解析根路径,默认为 tsconfig.json 位于的目录
"paths": {
"tslib": ["node_modules/tslib/tslib.d.ts"]
},
"forceConsistentCasingInFileNames": true, // 强制在文件名中使用一致的大小写,默认为 true
"esModuleInterop": true, // 通过为导入内容创建命名空间,实现 CommonJS 和 ES 模块之间的互操作性,默认为 true
"skipLibCheck": true // 跳过导入第三方 lib 声明文件的类型检查,默认为 true
},
"include": ["src"], // 指定需要编译文件,默认当前目录下除了 exclude 之外的所有.ts, .d.ts,.tsx 文件
"exclude": [
// 不编译这些目录里的文件
"node_modules"
]
}