Rsbuild
Help users quickly build Module Federation products in Rsbuild App or Rslib
Quick Start
Installation
You can install the plugin using the following command:
Register plugin
Rsbuild App
Rslib Module
Note
If you need to use the Module Federation runtime capabilities, please install @module-federation/enhanced
Configuration
- Type:
moduleFederationOptions
Module Federation Configuration
rsbuildOptions
Additional configuration for the Rsbuild plugin.
target
Only supported when used as a global plugin in Rslib.
- Type:
'web' | 'node' | 'dual' - Default:
'web'
Used to specify the target runtime environment for the output. When set to dual, it builds both Web (browser) output and Node.js (SSR) output.
After generating SSR output with target: 'dual', you can refer to Create a Modern.js Consumer, create a consumer, and integrate the corresponding Rslib SSR producer for development.
ssr
This option is deprecated. Please use target: 'dual' to enable SSR.
- Type:
boolean - Default:
false
When enabled, it generates SSR output.