dependents/node-filing-cabinet

Issue in tsConfig options resolving

vansosnin opened this issue · 3 comments

Hello!

Noticed that method that is being used to resolve ts config compiler options not working properly if passed config has extends field.

const {options} = ts.convertCompilerOptionsFromJson(tsConfig.compilerOptions);

Maybe try using parseJsonConfigFileContent from TS Compiler API? It resolves CompilerOptions well, though a bit more complicated in use: you need to create an instance of ParseConfigHost. It can be done like here.

Wrote red test. Using parseJsonConfigFileContent did not work. Have no idea now about how to resolve extending TS config. Any thoughts?

Okay, now it seems working. Can someone check the PR? @mrjoelkemp maybe?

Merged and released. Thanks again!