Replies: 1 comment 3 replies
-
If @ScriptedAlchemy or somebody else could respond this would be awesome! :-) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm running into an issue with the dependency sharing feature in enhanced module federation, and I could use some guidance.
I'm working with the module-federation-enhanced example from the Rsbuild examples repo. I've set up both the provider and consumer, and I can successfully access the consumer at http://localhost:2000/.
With Chrome developer tools open, I monitored the network traffic while loading the consumer and noticed something odd:
According to the configuration, both the provider and consumer are supposed to share react and react-dom, and they're using the same version. However, despite this setup,
/lib-react.js
(which I believe isreact-dom
) seems to be loaded twice.But the network traffic shows that
lib-react
(this isreact-dom
as far as I can see) is loaded twice.I tried modifying the sharing configuration as follows, based on recommendations I found suggesting react should always be shared as a singleton:
Unfortunately, this change didn't resolve the issue. I'm clearly missing something, but I'm not sure what. 🤔
If anyone has tips or could point me to relevant documentation that might help shed some light on this, I'd really appreciate it!
Thanks in advance for your help!
Best,
Jakob
Beta Was this translation helpful? Give feedback.
All reactions