Skip to content

fix(manifest): preserve ESM remote entry type - #4894

Merged
2heal1 merged 2 commits into
mainfrom
codex/esm-remote-entry-metadata
Jul 14, 2026
Merged

2heal1 merged 2 commits into
mainfrom
codex/esm-remote-entry-metadata

Conversation

@zackarychapple

@zackarychapple zackarychapple commented Jul 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Preserves the configured library.type: "module" when Rspack pre-emits remote-entry metadata as global. The manifest now selects the correct ESM remote-entry loader, with a focused regression test.

This is intentionally isolated from the application-lifecycle work discussed in #4891 so it can be reviewed and merged independently.

Related Issue

Split from #4891 in response to review feedback; no separate 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.

@changeset-bot

changeset-bot Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c64a469

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

This PR includes changesets to release 47 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
node-dynamic-remote-new-version Patch
node-dynamic-remote Patch
@module-federation/playground 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/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-rock Patch
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/esbuild Patch
@module-federation/observability-plugin 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

@pkg-pr-new

pkg-pr-new Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

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

@module-federation/cli

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

create-module-federation

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

@module-federation/dts-plugin

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

@module-federation/enhanced

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

@module-federation/error-codes

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

@module-federation/esbuild

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

@module-federation/managers

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

@module-federation/manifest

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

@module-federation/metro

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

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

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

@module-federation/metro-plugin-rnef

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

@module-federation/metro-plugin-rock

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rock@c64a469

@module-federation/modern-js

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

@module-federation/modern-js-v3

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

@module-federation/native-federation-tests

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

@module-federation/native-federation-typescript

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

@module-federation/nextjs-mf

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

@module-federation/node

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

@module-federation/observability-plugin

pnpm add https://pkg.pr.new/@module-federation/observability-plugin@c64a469

@module-federation/playground

pnpm add https://pkg.pr.new/@module-federation/playground@c64a469

@module-federation/retry-plugin

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

@module-federation/rsbuild-plugin

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

@module-federation/rspack

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

@module-federation/rspress-plugin

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

@module-federation/runtime

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

@module-federation/runtime-core

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

@module-federation/runtime-tools

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

@module-federation/sdk

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

@module-federation/storybook-addon

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

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

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

@module-federation/treeshake-frontend

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

@module-federation/treeshake-server

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

@module-federation/typescript

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

@module-federation/utilities

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

@module-federation/webpack-bundler-runtime

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

@module-federation/bridge-react

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

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

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

@module-federation/bridge-shared

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

@module-federation/bridge-vue3

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

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

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

commit: c64a469

@github-actions

github-actions Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Bundle Size Report

8 package(s) changed, 34 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/manifest 131.8 kB +894 B (+0.7%) 106 B no change
@module-federation/playground 28.92 MB -706 B (-0.0%) 51.8 kB no change

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/cli 2.3 kB -7 B (-0.3%) 2.4 kB -32 B (-1.3%)
@module-federation/core 1.0 kB -5 B (-0.5%) 1.0 kB -33 B (-3.0%)
@module-federation/devtools 30.3 kB +1 B (+0.0%) 30.3 kB -24 B (-0.1%)
@module-federation/enhanced 2.7 kB +2 B (+0.1%) 2.8 kB -43 B (-1.5%)
@module-federation/manifest 5.5 kB +22 B (+0.4%) 5.5 kB +22 B (+0.4%)
@module-federation/metro-plugin-rnc-cli 416 B -1 B (-0.2%) 435 B -26 B (-5.6%)
@module-federation/node 9.2 kB +3 B (+0.0%) 9.2 kB -29 B (-0.3%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 21.4 kB -18 B (-0.1%) 23.0 kB -17 B (-0.1%) +1.6 kB +1 B

Total dist (raw): 35.70 MB (+188 B (+0.0%))
Total ESM gzip: 122.9 kB (no change)
Total web bundle (gzip): 251.5 kB (+15 B (+0.0%))
Total node bundle (gzip): 254.2 kB (-165 B (-0.1%))
Tracked ./bundler entry gzip: 556 B (no change)
Tracked ./bundler web bundle (gzip): 4.7 kB (no change)
Tracked ./bundler node bundle (gzip): 4.7 kB (no change)

Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as ./bundler are measured separately so ENV_TARGET-driven tree-shaking is visible. Bare imports are externalized to keep package-level sizes consistent, and assets are emitted as resources.

@zackarychapple
zackarychapple marked this pull request as ready for review July 13, 2026 14:09

@ScriptedAlchemy ScriptedAlchemy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed implementation placement, fallback behavior, and coverage. CI is green and no unresolved review threads remain.

@2heal1
2heal1 merged commit d6a76d8 into main Jul 14, 2026
23 checks passed
@2heal1
2heal1 deleted the codex/esm-remote-entry-metadata branch July 14, 2026 02:20
@2heal1 2heal1 mentioned this pull request Jul 15, 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.

3 participants