Bundler integrations
Choose the adapter owned by the build tool. In every example, the same
mfOptions object goes to Module Federation and MFDoctor. Register MFDoctor after
the federation plugin so it can inspect the completed output.
- Vite, Rolldown-integrated Vite, or Vite Plus:
@tonoizer/mfdoctor/vite - Nuxt 3 or Nuxt 4:
@tonoizer/mfdoctor/nuxt - Rspack:
@tonoizer/mfdoctor/rspack - Rsbuild:
@tonoizer/mfdoctor/rsbuild - Webpack:
@tonoizer/mfdoctor/webpack - Modern.js:
@tonoizer/mfdoctor/modern(partial support)
Vite
The same adapter covers classic Vite, Rolldown-integrated Vite (rolldown-vite
and Vite 8+), and Vite Plus. MFDoctor selects the matching post-emit hook and
avoids duplicate analysis when a build exposes more than one lifecycle hook.
See Vite integration for lifecycle and configuration
details.
Nuxt 3 and Nuxt 4
Register MFDoctor next to the official Module Federation Nuxt module:
MFDoctor uses Nuxt's public vite:extendConfig hook for client and SSR builds.
The official Nuxt module still owns Module Federation. If that integration
already exposes nuxt.options.moduleFederation.config, you may omit MFDoctor's
explicit moduleFederation option.
Rspack
Use this adapter for direct @rspack/core projects:
Use the Rspack adapter for direct Rspack builds even if the repository also contains Modern.js or Rsbuild apps.
Rsbuild
The Rsbuild adapter runs through onAfterBuild, after Module Federation has
written its manifest and entry files.
Webpack
MFDoctor runs in afterEmit, after the enhanced Module Federation plugin has
produced the files used as evidence.
Modern.js
Register the Modern.js adapter with @module-federation/modern-js or
@module-federation/modern-js-v3:
This adapter composes a post-emit plugin through modifyBundlerChain and
records the build as Modern.js. Support remains partial until the compatibility
suite runs a full @modern-js/app-tools application build.
For a direct Rspack path inside tools.bundlerChain, use the public Rspack
adapter instead:
That path records the bundler as Rspack.
After the build
Every adapter writes project facts below .mf/doctor/. Build all hosts and
remotes, then compare them:
Use the CLI command reference for monorepo roots, CI formats, federation groups, baselines, and runtime correlation. Browse working examples for mixed Vite, Rspack, Rsbuild, and Webpack federations.