new ModuleFederationPlugin(options): ModuleFederationPluginAttributes
options:
ModuleFederationPluginOptionsoptions
Returns:
ModuleFederationPluginCreates an instance of ModuleFederationPlugin.
Attributes
options:
ModuleFederationPluginOptionsapply(compiler): voidAttributes
Applies the plugin by registering its hooks on the compiler.
Attributes
compilation:
CompilationThe compilation instance.
The hooks for the compilation.
Get the compilation hooks associated with this plugin.
Attributes
addContainerEntryDependency:
SyncHook<Dependency>addFederationRuntimeDependency:
SyncHook<Dependency>Attributes
exposes:
ExposesObject | (string | ExposesObject)[]Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
filename:
stringThe filename of the container as relative path inside the
output.path
directory.library:
LibraryOptionsOptions for library.
name:
stringThe name of the container.
remotes:
RemotesObject | (string | RemotesObject)[]Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
remoteType:
"asset" | "module" | "asset-url" | "css-import" | "global" | "import" | "promise" | "this" | "var" | "script" | "commonjs" | "jsonp" | "assign" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "module-import" | "node-commonjs" | "css-url"The external type of the remote containers.
runtime:
string | falseThe name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
shared:
SharedObject | (string | SharedObject)[]Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
shareScope:
stringShare scope name used for all shared modules (defaults to 'default').