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
Next PageName

#Configuration Overview

The current page lists all the configuration options for Module Federation. Please refer to the documentation for Rspack Plugin and Webpack Plugin and Vite Plugin to understand how to use them.

type ModuleFederationOptions = {
  // Name for module federation
  name: string;
  // Name for the remoteEntry file
  filename?: string;
  // Configuration for remote modules and entry information in module federation
  remotes?: Array<RemoteInfo>;
  // module federation expose module information
  exposes?: PluginExposesOptions;
  // Shared dependency configuration
  shared?: ShareInfos;
  // Dynamic publicPath
  getPublicPath?: string;
  // Runtime plugins
  runtimePlugins?: Array<string | [string, Record<string, unknown>]>;
  // The runtime implementation to use
  implementation?: string;
  // manifest configuration
  manifest?: boolean | PluginManifestOptions;
  // control page liveReload and types hot reload
  dev?: boolean | PluginDevOptions;
  // control types
  dts?: boolean | PluginDtsOptions;
  // Use a virtual runtime entrypoint instead of writing a temporary file to disk
  virtualRuntimeEntry?: boolean;
};