perf(nextjs-mf): derive federated stats from manifest#4909
Conversation
🦋 Changeset detectedLatest commit: 9b9d9ac The changes in this PR will be included in the next version bump. This PR includes changesets to release 47 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@module-federation/devtools
@module-federation/cli
create-module-federation
@module-federation/dts-plugin
@module-federation/enhanced
@module-federation/error-codes
@module-federation/esbuild
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/metro-plugin-rock
@module-federation/modern-js
@module-federation/modern-js-v3
@module-federation/native-federation-tests
@module-federation/native-federation-typescript
@module-federation/nextjs-mf
@module-federation/node
@module-federation/observability-plugin
@module-federation/playground
@module-federation/retry-plugin
@module-federation/rsbuild-plugin
@module-federation/rspack
@module-federation/rspress-plugin
@module-federation/runtime
@module-federation/runtime-core
@module-federation/runtime-tools
@module-federation/sdk
@module-federation/storybook-addon
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/typescript
@module-federation/utilities
@module-federation/webpack-bundler-runtime
@module-federation/bridge-react
@module-federation/bridge-react-webpack-plugin
@module-federation/bridge-shared
@module-federation/bridge-vue3
@module-federation/inject-external-runtime-core-plugin
commit: |
|
🚀 Preview Environment Ready!
Details:
|
Bundle Size Report12 package(s) changed, 30 unchanged. Package dist + ESM entry
Bundle targets
Consumer scenarios
Total dist (raw): 35.79 MB (+11.3 kB (+0.0%)) Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as |
Description
Use
mf-manifest.jsonas the primary source of expose assets for Next.jsflushChunks, avoiding the second full Webpack stats traversal that madefederated-stats.jsonexpensive on large builds.Rolling upgrades remain bidirectionally compatible: new hosts fall back to
federated-stats.jsonfor old or partially analyzed remotes, while new remotes still emit both historical stats filenames with the expose fields consumed by old hosts. Custom manifest filenames, browser and SSR public paths, nested/scoped aliases, CSS assets, and missing exposes are covered.Because this resolves #4706 under the default configuration, the unreleased
skipFederatedStatsoption and changeset from #4732 are removed instead of retaining a public performance flag.manifest: falseanddisableAssetsAnalyzestill select complete legacy stats generation for configurations that do not provide analyzed manifest assets.The local Next fixture removed the measured 286.60 ms
stats.toJsoncorrelation call while still emitting both compatibility assets. Final production E2E completed 19/19 tasks and 28 browser tests with no failures. Focused suites passed 52 node tests, 26 nextjs-mf tests, and 69 SDK tests with one existing skip; affected builds passed 18/18 tasks. The repo-wide Prettier gate remains blocked only by pre-existing generatedpackages/playground/src/generated/bridgeRuntimeFiles.ts; all changed files pass formatting.Related Issue
Closes #4706. Supersedes the unreleased performance opt-out from #4732.
Types of changes
Checklist