Issue in tsConfig options resolving
vansosnin opened this issue · 3 comments
vansosnin commented
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.
vansosnin commented
Wrote red test. Using parseJsonConfigFileContent
did not work. Have no idea now about how to resolve extending TS config. Any thoughts?
vansosnin commented
Okay, now it seems working. Can someone check the PR? @mrjoelkemp maybe?
mrjoelkemp commented
Merged and released. Thanks again!