-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement] Let typescript load the config file, instead of tsconfig package #245
Comments
I can't recall all details of why it is read in the way it is, currently, but this is definitely worth a look |
using tsc.readconfigfile for me only results in a parsing of the actual JSON - I'm unsure how to translate that to an actual compilerOptions object. Would love a PR. |
The result of I'll see if I can get some spare time tomorrow, and I'll take care of a PR. |
Strange. In my attempts I simply got an object with an "extends" key. |
Hm... yes, things seem to be a bit more complicated, though I'm a bit surprised - I recently used the same for a PR in another project, and things worked fine. I'll dig a little bit deeper into this... €dit: Ok, after taking a closer look, I can confirm that However, after checking out how TypeScript's cli is picking up the config, it seems to involve the usage of |
Hi there,
I've just switched some of my playground projects to use ts-jest instead of my own typescript preprocessor.
While I really appreciate to have less code to maintain, I've recognized that ts-jest uses a quite complex way to load the configuration file built upon the tsconfig package.
And I'm wondering why. Typescript itself offers a
readConfigFile
function:In this example,
result.config
would contain the config in case everything worked fine, or some diagnostics inresult.error
in case it failed to read it.It would be especially useful in terms of the
extends
property, which is handled automatically (and its handling in the TS source looks by far more complicated than the one from ts-jest).Any thoughts?
The text was updated successfully, but these errors were encountered: