aleclarson / vite-tsconfig-paths

Support for TypeScript's path mapping in Vite
MIT License
1.24k stars 43 forks source link

Feature request: possibility to configure the root tsconfig.json #48

Closed DominikPieper closed 2 years ago

DominikPieper commented 2 years ago

Hey,

thanks for the project. We use it for our Vite Nx integration. Right now we, unfortunately, have a problem already mentioned here: https://github.com/aleclarson/vite-tsconfig-paths/issues/47

Could you make the root tsconfig.json filename be configurable? In an Nx monorepo the root tsconfig is by default 'tsconfig.base.json' and renaming it would break compatibility.

Great thanks and best regards

aleclarson commented 2 years ago

Can you fork this repo and create a branch where the ./demo folder is setup to be an Nx monorepo? It would help a ton in supporting this use case :)

aleclarson commented 2 years ago

Btw, have you tried using the root option? As long as you have tsconfig.json files in your various packages, they should be found if you set the root to a common parent directory.

DominikPieper commented 2 years ago

I'll close this. Had an idea how to hunt this down for us right now :-)

Maximilianos commented 2 years ago

I ran into this as well and have posted how I resolved it based on the notes in this thread and elsewhere in the following issue: https://github.com/aleclarson/vite-tsconfig-paths/issues/12#issuecomment-1081160667