Replies: 1 comment
-
One scenario I can think of is that react has been bundled in the lib. In addition, can you provide a reproducible repo? |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using yarn and rspack in my app (react) in monorepo.
I extracted part of UI elements to internal project to be able to share them between different projects. Shared part is built using tsup, like:
All shared deps where put in
peerDependencies
section:My problem is that main app (built with rsbuild) started showing strange errors like "Invalid Hook call". I think this is due to react libs duplication in final bundle. Problem can be mitigated somehow if I remove
nmHoistingLimits: workspaces
from .yarnrc.yml but then webstorm has a problem with tracking dependencies. So the question is, can rsbuild help me solve this problem?This is my current rsbuild.config.ts
=== EDIT:
I managed to solved it using
But this is not very efficient if new libs would be added
Beta Was this translation helpful? Give feedback.
All reactions