plugins.ModuleFederationPlugin
Webpack plugin to configure Module Federation with platform differences handled under the hood.
Usually, you should use Repack.plugin.ModuleFederationPlugin
instead of webpack.container.ModuleFederationPlugin.
Repack.plugin.ModuleFederationPlugin creates:
filename option when exposes is definedlibrary option when exposes is definedshared option with react and react-native dependenciesremotes into ScriptManager-powered promise new Promise loadersYou can overwrite all defaults by passing respective options.
remotes will always be converted to ScriptManager-powered promise new Promise` loaders
using Federated.createRemote.
example Host example.
example Host example with additional shared dependencies.
example Container examples.
• new ModuleFederationPlugin(config)
| Name | Type |
|---|---|
config |
ModuleFederationPluginConfig |
packages/repack/src/webpack/plugins/ModuleFederationPlugin.ts:112
▸ apply(compiler): void
Apply the plugin.
| Name | Type | Description |
|---|---|---|
compiler |
Compiler |
Webpack compiler instance. |
void
packages/repack/src/webpack/plugins/ModuleFederationPlugin.ts:237