File tree 1 file changed +11
-13
lines changed
1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change 3
3
"module" : " ESNext" ,
4
4
"target" : " es6" ,
5
5
"moduleResolution" : " node" ,
6
- "allowSyntheticDefaultImports" : true ,
6
+
7
7
// 允许从没有设置默认导出的模块中默认导入。这并不影响代码的输出,仅为了类型检查。
8
-
9
- // 我感觉baseUrl和paths都不用,因为有webpack啊
10
- "baseUrl" : " ." ,// import的相对起始路径 // 解析非相对模块名的基准目录
11
- // `vs code`所需要的,在开发时找到对应的路径,真实的引用是在`webpack`中配置的`alias`
12
- // 所以这个配置没有鬼用啊
8
+ "allowSyntheticDefaultImports" : true ,
9
+ "sourceMap" : true ,
10
+ "removeComments" : false ,
11
+
12
+ // import的相对起始路径 // 解析非相对模块名的基准目录
13
+ "baseUrl" : " ." ,
13
14
"paths" : {
14
15
"@/*" :[" ./src/*" ],
15
16
"public/*" : [" ./public/*" ],
16
17
"components/*" : [" ./src/components/*" ],
17
18
"pages/*" : [" ./src/pages/*" ],
18
19
"layout/*" : [" ./src/layout/*" ]
19
20
},
21
+
20
22
// 开启装饰器的使用
21
23
"experimentalDecorators" : true ,
22
24
"emitDecoratorMetadata" : true ,
25
+
23
26
// 开启`JSX`模式,
24
27
// `preserve`的配置让`tsc`不会去处理它,而是使用后续的`babel-loader`进行处理
25
- "jsx" : " preserve" , // 但他默认就是preserve,所以其实可以删了
26
-
27
- "sourceMap" : true ,
28
-
28
+ "jsx" : " react" ,
29
29
"strict" : true , // 启用严格模式
30
- "noImplicitAny" : true ,
31
-
32
-
30
+ "noImplicitAny" : true
33
31
},
34
32
"exclude" : [
35
33
" node_modules"
You can’t perform that action at this time.
0 commit comments