Issue with Stateful Module Sharing #3579
Unanswered
sudhakar-selva
asked this question in
Q&A
Replies: 2 comments 5 replies
-
you need optimization.runtimeChunk.single.. look at module-federation-examples/runtime-plugins/single-runtime to see how to do it - the host loading its own remote or a remote loading hosts remote causes 2 runtime graphs to load on the page - to avoid that youd want to have a shared runtime for when hosts remote is loaded by someone. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Share it as singleton or use single runtime chunk. Check runtime plugins folder in examples repo. There's a single runtime sample |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are facing a peculiar issue with MFV1. Not sure if this will happen on MFV2. Basically, we have a global module (refer to the code snippet below) which is exposed and consumed by remotes through MF. However, the module referenced in the remote and host seems to be pointing to different object references, leading to regressions.
globals.ts(Host)
RemoteA
What is the recommended approach to solve such issues and how to prevent this from happening? Is it happening because of custom splitChunks logic or the name of the entry point and MF name being different, etc.? Please suggest a way forward on this.
Beta Was this translation helpful? Give feedback.
All reactions