Micro frontends combination: Webpack host and Rspack remote #14088
|
@hardfist |
Replies: 1 comment
|
Yes, this works. Rspack's Module Federation implementation is wire-compatible with Webpack 5's Module Federation — they both produce the same container protocol at runtime. So a Webpack host can consume Rspack remotes and vice versa. A few things to keep in mind:
The Rspack team has explicitly maintained this compatibility as a design goal, so there shouldn't be any protocol-level issues. If you hit problems they're likely configuration mismatches rather than fundamental incompatibilities. Are you using |
Yes, this works. Rspack's Module Federation implementation is wire-compatible with Webpack 5's Module Federation — they both produce the same container protocol at runtime. So a Webpack host can consume Rspack remotes and vice versa.
A few things to keep in mind:
Use the same MF plugin version. If you're using
@module-federation/enhanced(the updated plugin), use it in both the host and remotes. If the host is on Webpack's built-inModuleFederationPlugin, the Rspack remote should userspack.container.ModuleFederationPlugin(the built-in one). Mixing@module-federation/enhancedon one side and the built-in plugin on the other can cause version negotiation issues.Shared dependencies ve…