-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
47 lines (47 loc) · 1.53 KB
/
tsconfig.json
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配置,这将使用编译器的默认值
"compilerOptions": {
// ↓指定编译的ECMAScript目标版本
"target": "es2020",
// ↓指定生成哪个模块系统代码
"module": "es2020",
// ↓指定模块解析策略:'node' (Node.js) 或 'classic' (TypeScript 1.6 版本之前使用)
"moduleResolution": "node",
// ↓启用所有严格类型检查选项。
"strict": true,
// ↓编译过程中需要引入的库文件
"lib": [
"es2020"
],
// ↓编译时是否生成.map文件
"sourceMap": true,
// ↓支持使用import fs from 'fs'的方式引入commonjs包
"esModuleInterop": true,
// ↓忽略所有的声明文件( *.d.ts)的类型检查。
"skipLibCheck": true,
// ↓引入文件时区分文件名大小写
"forceConsistentCasingInFileNames": true,
// ↓设置基本目录以解析非绝对模块名称
"baseUrl": ".",
// ↓设置模块名称到基于baseUrl的路径映射
"paths": {
"@/*": [
"src/*"
]
}
},
// ↓指定要编译的文件,这些文件名是相对于包含tsconfig.json的目录解析的。
// ↓支持通配符:* (匹配0或多个字符)、? (匹配一个任意字符)、**/ (递归匹配任意子目录))
"include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue"
],
// ↓和include一样,不过是指定解析include时应跳过的文件
"exclude": [
"node_modules",
"dist",
"**/*.js"
]
}