For AI agents: the complete documentation index is available at https://mfdoctor.kevinbeier.com/de/llms.txt, the full documentation bundle is available at https://mfdoctor.kevinbeier.com/de/llms-full.txt, and this page is available as Markdown at https://mfdoctor.kevinbeier.com/de/rules/config/rsbuild-mf-api-generation.md.

Dies ist die deutsche mfdoctor-Dokumentation. Technische Bezeichner, CLI-Flags, Regel-IDs und Codebeispiele bleiben unverändert, damit die Inhalte zwischen den Sprachen vollständig kompatibel bleiben. Verwenden Sie den Sprachumschalter für die kanonische englische Fassung.

config/rsbuild-mf-api-generation

  • Kategorie: correctness
  • Standardschweregrad: error

Problem

Rsbuild Module Federation 1.5 (moduleFederation.options) and @module-federation/rsbuild-plugin v2 use different option surfaces. Copied or nested keys are ignored or crash during generate/runtime instead of emitting the expected MF API, types, or manifest.

So beheben Sie das Problem

Use @module-federation/rsbuild-plugin with a flat pluginModuleFederation({ ... }) config for MF 2.0 generation options (dts, manifest, getPublicPath, …). Keep Rsbuild moduleFederation.options for MF 1.5 only. Pass target / environment / ssrDir as the plugin second argument, never under a nested options bag.

Suppress or retarget with rules["config/rsbuild-mf-api-generation"] set to "off" or a severity, see Suppressions and allowlists.

Quellen