logologo
Guide
Practice
Configuration
Plugins
Showcase
Blog
Ecosystem
Module Federation Examples
Practical Module Federation
Zephyr Cloud
Nx
简体中文
English
Guide
Practice
Configuration
Plugins
Showcase
Blog
Module Federation Examples
Practical Module Federation
Zephyr Cloud
Nx
简体中文
English
logologo
Overview
Name
Filename
Remotes
Exposes
Shared
runtimePlugins
Get Public Path
Implementation
DTS
Dev
Manifest
shareStrategy
experiments
Edit this page on GitHub
Previous PageGet Public Path
Next PageDTS

#Implementation

  • Type: string
  • Required: No
  • Default value: undefined

The implementation option is used to modify the actual bundler runtime version. It should be set to the path of @module-federation/runtime-tools.

When working with Module Federation, the runtime is responsible for handling the loading and sharing of remote modules. By default, the bundler uses a specific version of the runtime that is compatible with its version. However, in some cases, you might need to use a different version of the runtime or a custom implementation.

By specifying the implementation option, you can provide a path to the desired runtime implementation. This is particularly useful if you need to use features from a newer or older version of the runtime that are not available in the default version provided by the bundler.

For example, if you want to use a specific version of @module-federation/runtime-tools, you can set the implementation option in your configuration file:

module.exports = {
  // ...other configurations
  plugins: [
    new ModuleFederationPlugin({
      // ...other Module Federation options
      implementation: require.resolve('@module-federation/runtime-tools'),
    }),
  ],
};