-
Notifications
You must be signed in to change notification settings - Fork 1
/
tsconfig.json
23 lines (23 loc) · 983 Bytes
/
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
{
"compileOnSave": false,
"buildOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "docs", // 指定输出目录
"module": "esnext", // 指定使用模块: 'commonjs', 'amd', 'system', 'umd' or 'es2015'
"target": "es6", // 指定 ECMAScript 目标版本: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'
"jsx": "react", // 允许编译 javascript 文件
"moduleResolution": "node", // 选择模块解析策略
"allowSyntheticDefaultImports": true,
"lib": ["es6", "dom"],
"sourceMap": true, // 生成相应的 '.map' 文件
"allowJs": true, // 扩展名可以是 .js/.jsx
"checkJs": false, // 开启 js 检测
"noUnusedLocals": true, // 有未使用的变量时,抛出错误
"paths": {
"@/*": ["./*"]
}
},
"include": ["site/**/*", "@types/*", "components/*"], // 需要编译的文件目录
"exclude": ["node_modules", "docs", "public", "mock"] // 排除编译的文件目录
}