dividab / tsconfig-paths

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

register can't override baseURL #252

Open Tschonti opened 1 year ago

Tschonti commented 1 year ago

I don't fully understand how this library works, but a part of my project uses this lib to change the tsconfig. It changes all the items in the paths array, by replacing .ts with .js, then registers them with the baseUrl dist. This works well if in the original tsconfig the baseUrl value is not set. However, for a different part of my app, I need the baseUrl to be set to ./. In this case, the code that previously used this lib throws an error that it cannot find my tsconfig file. Is this issue related to this library at all, or is there a way to override the previous baseUrl?