Skip to content

fix(manifest): record split expose chunk assets#4489

Merged
2heal1 merged 2 commits intomainfrom
fix/manifest-asset-chunk-split
Mar 3, 2026
Merged

fix(manifest): record split expose chunk assets#4489
2heal1 merged 2 commits intomainfrom
fix/manifest-asset-chunk-split

Conversation

@2heal1
Copy link
Copy Markdown
Member

@2heal1 2heal1 commented Mar 2, 2026

Description

Record split expose chunk assets.

A chunk named "__federation_expose_Foo" may be split into

   "__federation_expose_Foo-<hash>"      

chunks, so we match both exact and prefix+dash patterns.

Related Issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 2, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 7fc8a8f
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69a648a68f96bd000858aa19
😎 Deploy Preview https://deploy-preview-4489--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 2, 2026

🦋 Changeset detected

Latest commit: 7fc8a8f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 43 packages
Name Type
@module-federation/manifest Patch
@module-federation/enhanced Patch
@module-federation/modern-js-v3 Patch
@module-federation/modern-js Patch
@module-federation/rspack Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/rsbuild-plugin Patch
@module-federation/rspress-plugin Patch
@module-federation/storybook-addon Patch
shared-tree-shaking-no-server-host Patch
shared-tree-shaking-no-server-provider Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider Patch
remote5 Patch
remote6 Patch
website-new Patch
@module-federation/runtime Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/dts-plugin Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/retry-plugin Patch
@module-federation/data-prefetch Patch
@module-federation/error-codes Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/runtime-core Patch
create-module-federation Patch
@module-federation/cli Patch
@module-federation/treeshake-server Patch
@module-federation/treeshake-frontend Patch
@module-federation/metro Patch
@module-federation/metro-plugin-rnef Patch
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch

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

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f83bec6b9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +241 to +243
: Object.keys(exposeFileNameImportMap).find((key) =>
chunk.name!.startsWith(key + '-'),
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match the longest expose prefix for split chunk names

The new prefix fallback uses Object.keys(exposeFileNameImportMap).find(...), which returns the first key in insertion order rather than the most specific match. If users provide custom expose name values that share a dash prefix (for example foo and foo-bar), a split chunk like foo-bar-<hash> satisfies both prefixes and can be attributed to foo when foo was declared first, causing manifest assets to be recorded under the wrong expose.

Useful? React with 👍 / 👎.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 2, 2026

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@daed734

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@daed734

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@daed734

@module-federation/data-prefetch

pnpm add https://pkg.pr.new/@module-federation/data-prefetch@daed734

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@daed734

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@daed734

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@daed734

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@daed734

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@daed734

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@daed734

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@daed734

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@daed734

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@daed734

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@daed734

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@daed734

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@daed734

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@daed734

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@daed734

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@daed734

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@daed734

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@daed734

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@daed734

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@daed734

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@daed734

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@daed734

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@daed734

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@daed734

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@daed734

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@daed734

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@daed734

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@daed734

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@daed734

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@daed734

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@daed734

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@daed734

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@daed734

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@daed734

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@daed734

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/@module-federation/inject-external-runtime-core-plugin@daed734

commit: daed734

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 2, 2026

Bundle Size Report

3 package(s) changed, 38 unchanged.

Package Total dist Delta ESM gzip Delta
manifest 138.4 kB +3.5 kB (+2.6%) 182 B no change
runtime-tools 4.9 kB +39 B (+0.8%) 95 B no change
webpack-bundler-runtime 89.4 kB +33 B (+0.0%) 405 B no change

Total dist: 6.71 MB (+3.6 kB (+0.1%))
Total ESM gzip: 79.0 kB (no change)

@2heal1 2heal1 merged commit 5a4f503 into main Mar 3, 2026
24 checks passed
@2heal1 2heal1 deleted the fix/manifest-asset-chunk-split branch March 3, 2026 02:55
@2heal1 2heal1 mentioned this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants