-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsconfig.json
More file actions
35 lines (31 loc) · 988 Bytes
/
Copy pathtsconfig.json
File metadata and controls
35 lines (31 loc) · 988 Bytes
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
{
"compilerOptions": {
"module": "ESNext",
"target": "es6",
"moduleResolution": "node",
//允许从没有设置默认导出的模块中默认导入。这并不影响代码的输出,仅为了类型检查。
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"removeComments": false,
// import的相对起始路径 // 解析非相对模块名的基准目录
"baseUrl": ".",
"paths": {
"@/*":["./src/*"],
"public/*": ["./public/*"],
"components/*": ["./src/components/*"],
"pages/*": ["./src/pages/*"],
"layout/*": ["./src/layout/*"]
},
// 开启装饰器的使用
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
// 开启`JSX`模式,
// `preserve`的配置让`tsc`不会去处理它,而是使用后续的`babel-loader`进行处理
"jsx": "react",
"strict": true, // 启用严格模式
"noImplicitAny": true
},
"exclude": [
"node_modules"
]
}