tsconfig.json

TS 编译器的配置文件

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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
/* 编译器的选项 */
"compilerOptions": {
/* 被编译成的 ES 版本 */
/* esnext 表示最新版本 */
"target": "esnext",
/* 模块化规范的版本 */
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env"
],
"paths": {
"@/*": [
"src/*"
]
},
/* 项目需要用到的库 */
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
/* 需要编译的文件 */
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
/* 不需要编译的文件 */
"exclude": [
"node_modules"
]
}