For AI agents: the complete documentation index is available at https://mfdoctor.kevinbeier.com/llms.txt, the full documentation bundle is available at https://mfdoctor.kevinbeier.com/llms-full.txt, and this page is available as Markdown at https://mfdoctor.kevinbeier.com/vite-integration.md.

Vite integration notes

The Vite plugin is not a thin copy of the Rspack plugin. MFDoctor keeps its Vite-only facts under the vite section of project.json.

Rolldown and Vite Plus

Module Federation on Rolldown-integrated Vite and Vite Plus uses the same MFDoctor entry as classic Vite:

import { federation } from "@module-federation/vite";
import { federationDoctor } from "@tonoizer/mfdoctor/vite";
FlavorHow MFDoctor detects itEmit engine
Classic ViteDefault when no strong Rolldown / Vite Plus markersrollup
rolldown-vite / Vite 8+Declared rolldown-vite, vite→rolldown-vite alias, or meta.rolldownVersionrolldown
Vite Plusvite-plus / @voidzero-dev/vite-plus-core (including vite alias overrides)rolldown

Bare rolldown in package.json is weak evidence only (common in monorepo tooling roots) and does not reclassify classic Vite by itself.

MFDoctor records bundler.lifecycle (flavor, engine, postEmitHook, evidence) on project.json. Emit analysis prefers on-disk dist/** / build/** assets over the in-memory Rollup bundle object, because Rolldown does not share that object across hooks. When Rolldown has not finished writing on writeBundle, MFDoctor defers to closeBundle. If emit facts are still missing, it leaves capabilities.emittedAssets false so doctor/partial-analysis reports the gap honestly.

Direct Rolldown without @module-federation/vite is unsupported — Rolldown dropped built-in Module Federation in favor of the Vite plugin.

Vite-only options

OptionRisk or opportunityMFDoctor guidance
publicPathWrong base breaks remote chunks and CSSCompare with manifest output
bundleAllCSSFull CSS set can repeat for every exposeWarn for multi-expose producers
hostInitInjectLocationHTML and entry injection serve different app shapesSSR needs entry (vite/host-init-inject-ssr)
moduleParseTimeoutFixed timer can end a busy large parsePrefer idle timeout
moduleParseIdleTimeoutResets while modules are activeBetter for large builds
varFilenameAdds a synchronous global-format entryVerify filename and deployment; intentional mixed-bundler escape hatch
target / ssrExternals / ssrEntryLoaderChanges server remote output / React instance ownershipKeep SSR contracts aligned (vite/ssr-nitro-externals)
disableRemote/shared/snapshotRemoves runtime capabilitiesReject config that still uses them

Remotes typing

Vite string remotes and object remotes without type default to var. MFDoctor warns via vite/remotes-prefer-module unless you set explicit type: 'module' (Vite↔Vite ESM), another explicit type such as global for webpack/rspack remotes, or configure producer varFilename for var-host interop (vite/var-filename-interop).

Dialect fact matrix (config-only vs plugin-resolved)

CheckCLI config-onlyPlugin configResolved
Remotes typing / varFilenameYesYes
hostInitInjectLocation / SSRYes (MF options + deps)Yes (+ builds when targetKind=ssr)
manualChunks / codeSplitting.groupsSkipYes (bundler.viteConfig)
Hashed filenameYesYes
remoteHmrYes when set on MF optionsYes
resolve.alias ∩ sharedSkipYes
server.originSkipYes

The full current surface is in the official normalizer.

Chunk ownership

The plugin replaces user manualChunks and codeSplitting.groups choices where needed. This is intentional: federation bootstrap depends on isolated runtime-init and loadShare chunks. A custom group can create an init-order cycle.

Fix: move general chunk tuning outside the federation runtime graph. Do not fight the plugin by reapplying manual chunks after it.

Source: Vite plugin config hook.

Manifest asset analysis

manifest.disableAssetsAnalyze is not the same as dev.disableAssetsAnalyze. The manifest option can speed a development consumer, but on a producer it omits shared/expose asset detail. The official mf skill currently describes this under dev; MFDoctor follows the actual plugin type and implementation.

Fix: keep full asset analysis for production producer manifests. If it is disabled for local speed, do not use that manifest as release evidence.