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/configuration-audit.md.

Configuration audit

This page separates common Module Federation config from Vite-only controls. Use it as a review checklist even when a rule does not yet automate the check.

Common and Core/Rspack/Rsbuild options

OptionMain riskPractical fix
nameRuntime/global collisionUse one stable unique name per container
filenameMissing or unsafe remote entryUse a relative JavaScript filename and verify emission
library + remoteTypeProducer/consumer format mismatchAlign global, module, CommonJS, or script contracts
remotesBad URL, alias, scope, or offline startupPrefer HTTPS manifest URLs; test failure recovery
shareScopeIsolated pools cannot reuse packagesAlign top-level, remote, and item scopes
exposesBad public key or missing sourceUse ./Name keys and exact paths
sharedDuplicate frameworks or unsatisfied versionsAlign singleton, versions, scope, strictness, and fallback
runtimePluginsMissing plugin or unsafe recoveryResolve every plugin and test each hook path
getPublicPathDynamic-code and asset-base riskKeep the stringified function small, static, and reviewed
implementationRuntime/plugin version skewResolve a compatible runtime-tools implementation
dtsMissing/stale consumer contractsGenerate types in CI and choose an explicit abort policy
devReload/type-HMR behavior differs from buildDocument disabled reload features and test remote HMR
manifestMissing runtime metadata or incomplete asset dataEmit it for releases; keep producer asset analysis enabled
shareStrategyStartup cost vs late remote failurePick version-first or loaded-first intentionally
Host/remote shareStrategy mixInconsistent shared negotiation across the graphAlign federation-wide, or document intentional exceptions
Circular remotesNested init / type extraction can deadlockKeep the remotes graph a DAG
Remote alias prefixesRuntime rejects alias that prefixes another nameRename aliases so none is a prefix
Nested producer DTSMissing extracted remote types in producer archiveEnable dts.generateTypes.extractRemoteTypes
dts.generateTypes.outputDirType zip path drifts from nested filenameAlign outputDir with the remote-entry directory layout
Direct .js remotes + DTSNo type URL without manifests/remoteTypeUrlsPrefer manifests or set remoteTypeUrls
Non-string output.publicPathManifest generation is skipped upstreamUse a string/auto publicPath when manifests are required
Localhost remotes in CIDeployed builds cannot reach loopback remotesUse deployed URLs for CI/production MFDoctor runs
experiments.asyncStartupEntry exports become asyncEnsure direct/UMD consumers await the Promise
externalRuntime pairHard load-order dependencyOne pure provider; externalize only downstream browser remotes
snapshot/remote/shared removalTree-shaken capability still usedNever disable a configured capability
shared tree shakingIncomplete deployment unionPublish the merged secondary artifact and update snapshots
injectTreeShakingUsedExportsConflicts with server-calcDisable it for deployment-calculated exports
treeShakingDirNo known fallback artifact locationConfigure and publish the directory
shared tree-shaking pluginsSecondary build misses original transformsPackage only the needed build plugins and pin versions

Official option pages: overview, shared, DTS, dev, manifest, and experiments.

Vite-only options

OptionMain riskPractical fix
publicPathBrowser assets resolve from the wrong originCompare config with emitted manifest metadata
bundleAllCSSEvery expose receives every stylesheetKeep false unless the global style contract is deliberate
ignoreOriginProxy entry origin behavior changesUse only with a tested deployment base
virtualModuleDirInvalid or colliding virtual module folderUse one simple directory name without slashes
hostInitInjectLocationHTML-less/SSR app misses initUse entry when no usable HTML transform exists
parser timeoutsPartial dependency discoveryUse an idle timeout for large active builds
varFilenameSync script contract differs from ESM entryLoad it through a synchronous script and test the global name
targetBrowser and Node output rules mixSet the real execution environment
ssrExternalsServer-only package gets bundledExternalize explicit Node-only dependencies
direct capability flagsUseful runtime feature is removedMatch flags to actual remotes/shared/snapshot use

Vite source: option normalizer and plugin integration.

Output verification

Config review is not enough. In CI, confirm:

  1. the configured remote entry exists;
  2. manifest name and entry metadata match config;
  3. every expose appears and has assets;
  4. manifest shared versions match the lockfile install;
  5. type metadata and archives exist when DTS is enabled;
  6. every application's project.json passes federation-wide analysis.