-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtsconfig.json
25 lines (25 loc) · 1.01 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
{
"compilerOptions": {
"experimentalDecorators": true,
"esModuleInterop": true, // 这个开关为true代表和babel import行为一致,为false代表需要import * as xx
"module": "esnext", // 使用 esnext 模块
"target": "es2020", // 编译成 esnext (Babel 将做剩下的事情) https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping
"allowSyntheticDefaultImports": true, // 看下面
"baseUrl": ".", // 可以相对这个目录 import 文件
"sourceMap": false, // 使 TypeScript 生成 sourcemaps
// "outDir": "dist/umd/ts", // 构建输出目录
"jsx": "react", // 开启 JSX 模式
"strict": true,
// "rootDir": ".",
"allowJs": true,
"moduleResolution": "node",
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"typeRoots": ["node_modules/@types", "typings", "index.d.ts"]
},
"include": ["src", "typings", "index.d.ts"]
}