Simple buildable React Library does not work #31565
Unanswered
luckyluggi
asked this question in
Questions
Replies: 2 comments
-
Thanks for your help. After googling the Plugin i found dis documentation. thats where i probably should have looked: According to that i can also import from @nx/vite/plugins/nx-tsconfig-paths.plugin without installing vite-tsconfig-paths is that also recommended? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Project
I am new to nx, but i want to create a microfrontend application where all remotes share a componentlibrary.
From what i read i should create this componentlibrary as a buildable library.
So i tried to set that up like descriped in the
Repro steps
.This simple setup build by running 2 nx generators throws the error mentioned at the end of this post.
Am i dping something wrong?
I have uploaded this project to github here: https://github.com/luckyluggi/nx_buildable_lib
I think this is a very basic usecase that most people might need, so i am surprised it doesnt work.
I really hope someone could help me solve this. Thanks in advance.
Repro steps
npx create-nx-workspace@latest --pm pnpm --workspaces
With these Settings:
√ Where would you like to create your workspace? · frontends
√ Which stack do you want to use? · react
√ What framework would you like to use? · none
√ Application name · dashboard
√ Would you like to use React Router for server-side rendering [https://reactrouter.com/]? · Yes
√ Which unit test runner would you like to use? · vitest
√ Test runner to use for end to end (E2E) tests · playwright
√ Default stylesheet format · css
√ Would you like to use ESLint? · No
√ Would you like to use Prettier for code formatting? · No
√ Which CI provider would you like to use? · azure
pnpm nx g @nx/react:library designsystem --directory=libs/designsystem --buildable --publishable --importPath=@frontends/designsystem --unitTestRunner=vitest --compiler=swc
and chose vite as a bundler<FrontendsDesignsystem />
that i export from@frontends/designsystem
inapps\dashboard\app\app.tsx
.pnpm nx build designsystem
(and generated the typescript references when the cli asked me to)pnpm nx dev dashboard
wich correctly runs the projectBeta Was this translation helpful? Give feedback.
All reactions