fix: use typescript library to resolve tsconfig files #246
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
hey @jonaskello I'm running into this problem when trying to use a library that depends on yours
(dependency-cruiser)
My company has a fairly complex typescript configuration setup which we have extracted to a config that is extended from multiple levels deep, as a result the
paths
configuration that is inherited is unfortunately ignored by your library.This change updates the
tsconfig
resolution to use what is provided out-of-the-box bytypescript
itself to avoid needing to concern yourself with the details of how config extension actually workshttps://typestrong.org/ts-node/api/interfaces/TSCommon.html#readConfigFile
https://typestrong.org/ts-node/api/interfaces/TSCommon.html#parseJsonConfigFileContent
ironically I originally saw this while exploring the codebase of
dependency-cruiser
trying to get to the bottom of this issuehttps://github.com/sverweij/dependency-cruiser/blob/master/src/config-utl/extract-ts-config.js#L52