Using Multiple Instances of Module Federation Plugin in single build and Cross-Bundler Compatibility: Is Official Support Available? #3189
Replies: 1 comment 5 replies
-
In v1 it was. I think in v2 we place some restrictions on it due to how underlying plugins are applied. A better approach would be to use ContainerPlugin and not the full MF plugin again. So MFPlugin + ContainerPlugin Regarding cross bundler support. Consider v1 dead. Assume nothing works, but v2 can load v1 remotes. Cross bundler is supported by anyone who implements the v2 runtime. So webpack,rspack,vite plugins from us are all interoperable. Esbuild is too alpha to work with interop and we may not support esbuild due to how limited of an api it has. You can also use the federation runtime package a vanilla- which works anywhere. |
Beta Was this translation helpful? Give feedback.
-
We have an existing federated host (App A) that we want to use as a remote in another federated host (App B). However, the current remote entry of App A is not working in App B due to some issues. We managed to get it working by removing other remotes and only exposing the modules required by App B in App A's webpack configuration. Since other apps rely on App A, we're considering adding an additional instance of the Module Federation plugin in App A, resulting in two remote entries: x.remoteEntry.js and xyz.remoteEntry.js(Refer below config).
One last thing, can we consume federated apps from different bundlers? i know this works but is it officially supported? If so, is it supported only for v2, or for both versions?
Beta Was this translation helpful? Give feedback.
All reactions