mf-stats.json Field Reference

mf-stats.json is generated when manifest is enabled. It contains full build statistics, including exposes/shared/remotes assets, metaData (build info, remoteEntry, etc.), and asset analysis results.

Use this document to understand every field in mf-stats.json, which is helpful for debugging and analysis.

Top-level

FieldTypeRequiredDescription
idstringYesUnique build identifier
namestringYesFederation name
metaDataStatsMetaDataYesBuild and remote entry info
sharedStatsShared[]YesShared dependencies (full details)
remotesStatsRemote[]YesRemotes (entry/version plus usage)
exposesStatsExpose[]YesExposes (assets and dependencies)

metaData (Both Files)

metaData describes how this build is consumed at runtime and the build context. Both mf-stats.json and mf-manifest.json include it.

StatsMetaData

StatsMetaData has two mutually exclusive shapes:

  • Function form: getPublicPath: string
  • String form: publicPath: string (optional ssrPublicPath: string)

Shared fields:

| Field | Type | Required | Description | | ------------------- | ---------------- | -------- | ------------------------------------- | --- | | name | string | Yes | Current remote/host name | | globalName | string | Yes | Global name for the remoteEntry | | buildInfo | StatsBuildInfo | Yes | Build information | | remoteEntry | ResourceInfo | Yes | Remote entry resource | | ssrRemoteEntry | ResourceInfo | No | SSR remote entry (if any) | | prefetchInterface | boolean | No | Whether prefetch interface is enabled | | prefetchEntry | ResourceInfo | No | Prefetch resource (if any) | | types | MetaDataTypes | No | Types bundle info (if any) | | type | string | Yes | APP | NPM | | pluginVersion | string | No | MF Plugin version |

ResourceInfo

FieldTypeRequiredDescription
pathstringYesRelative path in build output
namestringYesFile name
typeRemoteEntryTypeYesRemote entry format (var/umd/system/...)

StatsBuildInfo

FieldTypeRequiredDescription
buildVersionstringYesBuild version
buildNamestringYesBuild name
targetstring[]NoBuild targets
pluginsstring[]NoTree-shaking plugins
excludePluginsstring[]NoTree-shaking exclude plugins

MetaDataTypes

FieldTypeRequiredDescription
pathstringYesOutput path
namestringYesFile name (required for legacy types, will be deprecated)
apistringYesAPI entry
zipstringYesZip path

assets (Both Files)

StatsAssets describes sync/async assets for a shared or exposed module. Both files use it.

StatsAssets

FieldTypeRequiredDescription
jsStatsAssetsInfoYesJavaScript assets
cssStatsAssetsInfoYesCSS assets

StatsAssetsInfo

FieldTypeRequiredDescription
syncstring[]YesInitial assets
asyncstring[]YesAsync assets

shared

StatsShared

FieldTypeRequiredDescription
idstringYesShared id
namestringYesPackage name
versionstringYesVersion used in this build
singletonbooleanYesSingleton
requiredVersionstringYesrequiredVersion
hashstringYesContent hash
assetsStatsAssetsYesAssets
depsstring[]YesDependencies
usedInstring[]YesUsed by containers/modules
usedExportsstring[]YesUsed exports
fallbackstringYesTreeshaking Fallback path/id
fallbackNamestringYesTreeshaking Fallback name
fallbackTypeRemoteEntryTypeYesTreeshaking Fallback type

remotes

StatsRemote records remote consumption info. It always includes either entry or version.

StatsRemoteVal (shared fields)

FieldTypeRequiredDescription
moduleNamestringYesRemote module name
federationContainerNamestringYesRemote container name
consumingFederationContainerNamestringYesConsumer container name
aliasstringYesAlias
usedInstring[]YesUsed by containers/modules

StatsRemote (mutually exclusive)

  • entry: string (exists, then no version)
  • version: string (exists, then no entry)

exposes

StatsExpose

FieldTypeRequiredDescription
idstringYesExpose id
namestringYesExpose name (e.g. ./Button)
pathstringNoSource path
filestringYesOutput file
requiresstring[]YesDependencies
assetsStatsAssetsYesAssets