Recently, I have been experimenting with the new extends feature in the tsconfig.json file that allows developers to create a base configuration which other modules can extend or modify.
Although it is functional, it is not working as anticipated. Strangely, the only way I could get it to work was by specifying compileroptions.lib in both the parent and child configurations.
parent.tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"lib": [ // Lib compiler options defined!!!
"dom",
"es6"
]
},
"exclude": [
"node_modules"
],
"awesomeTypescriptLoaderOptions": {
"resolveGlobs": true,
"forkChecker": true
},
"compileOnSave": false,
"buildOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
child.tsconfig.json (Expected)
{
"extends": "../parent.tsconfig.json",
}
child.tsconfig.json (Required to work)
{
"extends": "../parent.tsconfig.json",
"compilerOptions": {
"lib": [ //Have to specify lib again ==> Double-u-t-f
"dom",
"es6"
]
}
}
Any guidance on this issue would be greatly appreciated.
Cheers