MorJS tsconfig.json 配置
基础
tsconfig.base.json
配置{
"compilerOptions": {
"declaration": true,
"target": "ES2019",
"importHelpers": true,
"moduleResolution": "Node",
"sourceMap": true,
"noImplicitOverride": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"lib": ["ES6", "ESNext", "DOM"]
}
}
运行时 tsconfig.json
配置
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"target": "ES5",
"rootDir": "./src",
"outDir": "./lib",
"module": "CommonJS",
"skipLibCheck": true,
"typeRoots": ["./node_modules/@types/"]
},
"include": ["./src"]
}
编译时 tsconfig.json 配置
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib",
"module": "CommonJS",
"typeRoots": ["./node_modules/@types/"]
},
"include": ["src"]
}