You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
37 lines
1.2 KiB
{
|
|
"compilerOptions": {
|
|
"allowUnreachableCode": true,
|
|
"strictNullChecks": true,
|
|
// 严格模式, 强烈建议开启
|
|
"strict": true,
|
|
"allowJs": true,
|
|
// 目标js的版本
|
|
"target": "ES5",
|
|
// 目标代码的模块结构版本
|
|
"module": "ES2015",
|
|
// 在表达式和声明上有隐含的 any类型时报错。
|
|
"noImplicitAny": true,
|
|
// "__extends"等函数
|
|
// 将以"import {__extends} from 'tslib'的形式导入
|
|
"importHelpers": true,
|
|
// 删除注释
|
|
"removeComments": true,
|
|
// 保留 const和 enum声明
|
|
"preserveConstEnums": false,
|
|
// 编译过程中需要引入的库文件的列表
|
|
"lib": ["dom", "esnext"],
|
|
"sourceMap": true,
|
|
// 额外支持解构/forof等功能
|
|
"downlevelIteration": true,
|
|
// 此处设置为node,才能解析import xx from 'xx'
|
|
"moduleResolution": "node",
|
|
"esModuleInterop": true, // esModuleInterop选项的作用是支持使用import d from 'cjs'的方式引入commonjs包。
|
|
"baseUrl": ".",
|
|
"rootDir": ".", // 这个项目这个里的root必须要加上
|
|
"paths": {
|
|
"@/*": ["./src/*"]
|
|
}
|
|
},
|
|
"include": ["./src/**/*", "./global.d.ts"],
|
|
"exclude": ["node_modules"]
|
|
}
|
|
|