What is the correct way to use library from core app in nx using vite ? #30658
Unanswered
popoleeMaster
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have created an new NX project using Vite.
I setup a app and then generate a library using the generate react/library.
Add a component, export that component in index.ts of the library and add some path to the base tsconfig :
The tsconfig generated on the library looks like this :
Now the tsconfig generated of my main app looks like this :
Now, if I try to import my library into the app using the path written above I will get :
and
I would assume create a fresh nx project and 2 fresh library would work out of the box but this doesnt. So I am unsure what is the best way forward ?
Should I manually remove rootDir on library and app after generation ? Should I had references ? What is the suggested way ?
Beta Was this translation helpful? Give feedback.
All reactions