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(Rolldown / Vite Plus: partial) - Nuxt 3 or Nuxt 4:
@tonoizer/mfdoctor/nuxt(partial) - Rspack:
@tonoizer/mfdoctor/rspack - Rsbuild:
@tonoizer/mfdoctor/rsbuild - Webpack:
@tonoizer/mfdoctor/webpack - Modern.js:
@tonoizer/mfdoctor/modern(partial, App Tools CI emit blocked by lockfile trust policy)
There is no Next.js adapter. @module-federation/nextjs-mf is
unsupported (Pages Router only, unmaintained). Prefer Rsbuild or Modern.js.
See limitations.
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.
A copyable Vite Plus production smoke lives in
examples/compatibility/rolldown.
The matrix cell stays partial.
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.
A copyable local emit cell lives in
examples/compatibility/nuxt.
It registers @tonoizer/mfdoctor/nuxt the same way and production-builds. It
does not pull @module-federation/nuxt while that upstream example stays
baseline-blocked.
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:
For Modern.js 2, import moduleFederationPlugin from
@module-federation/modern-js instead of @module-federation/modern-js-v3.
This adapter composes a post-emit plugin through modifyBundlerChain and
records the build as Modern.js. The in-repo compatibility smoke still uses
Rspack-under-the-hood. A real @modern-js/app-tools cell cannot enter this
lockfile today: current App Tools releases fail trustPolicy: no-downgrade
because 2.63.x published npm provenance and later versions dropped it.
Support stays partial. The upstream core-demo re-soak remains #130.
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.