dividab / tsconfig-paths

Load node modules according to tsconfig paths, in run-time or via API.
MIT License
1.82k stars 104 forks source link

Change config context when referencing outside the main project #272

Open martinjlowm opened 3 months ago

martinjlowm commented 3 months ago

This PR intends to tackle the issue reported in https://github.com/dividab/tsconfig-paths/issues/153

When referencing files from other modules with their own configs, the primary config will no longer be used, but rather then initiate a new search for a configuration in the destination project which will then be cached for successive requests.

Turns out this violates the resolution algorithm of the TypeScript type checker. Haven't found any mention on that project about manipulating how the type checking behaves.