Skip to content

fix: support Rspack module identifiers - #4892

Merged
chenjiahan merged 1 commit into
module-federation:mainfrom
LingyuCoder:fix/rspack-module-identifiers
Jul 14, 2026
Merged

chenjiahan merged 1 commit into
module-federation:mainfrom
LingyuCoder:fix/rspack-module-identifiers

Conversation

@LingyuCoder

Copy link
Copy Markdown
Contributor

Description

Accept both webpack/container/reference/ and rspack/container/reference/ identifiers when:

  • extracting remote aliases for manifest stats
  • collecting delegated remote modules

This keeps the existing webpack behavior while supporting Rspack's bundler-specific module identifiers.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

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

Validation

  • pnpm --filter @module-federation/manifest test
  • pnpm --filter @module-federation/utilities test
  • package lint for manifest and utilities
  • Turbo build for manifest and utilities, including workspace dependencies

@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 51bca25

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/utilities Patch
@module-federation/enhanced Patch
@module-federation/modern-js-v3 Patch
@module-federation/modern-js Patch
@module-federation/rspack Patch
@module-federation/storybook-addon Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/rsbuild-plugin Patch
@module-federation/rspress-plugin 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

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

@LingyuCoder
LingyuCoder marked this pull request as ready for review July 13, 2026 08:46
@pkg-pr-new

pkg-pr-new Bot commented Jul 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

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

@module-federation/cli

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

create-module-federation

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

@module-federation/dts-plugin

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

@module-federation/enhanced

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

@module-federation/error-codes

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

@module-federation/esbuild

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

@module-federation/managers

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

@module-federation/manifest

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

@module-federation/metro

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

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

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

@module-federation/metro-plugin-rnef

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

@module-federation/metro-plugin-rock

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

@module-federation/modern-js

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

@module-federation/modern-js-v3

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

@module-federation/native-federation-tests

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

@module-federation/native-federation-typescript

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

@module-federation/nextjs-mf

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

@module-federation/node

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

@module-federation/observability-plugin

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

@module-federation/playground

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

@module-federation/retry-plugin

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

@module-federation/rsbuild-plugin

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

@module-federation/rspack

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

@module-federation/rspress-plugin

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

@module-federation/runtime

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

@module-federation/runtime-core

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

@module-federation/runtime-tools

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

@module-federation/sdk

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

@module-federation/storybook-addon

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

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

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

@module-federation/treeshake-frontend

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

@module-federation/treeshake-server

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

@module-federation/typescript

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

@module-federation/utilities

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

@module-federation/webpack-bundler-runtime

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

@module-federation/bridge-react

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

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

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

@module-federation/bridge-shared

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

@module-federation/bridge-vue3

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

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

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

commit: 51bca25

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Report

9 package(s) changed, 33 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/manifest 131.1 kB +162 B (+0.1%) 106 B no change
@module-federation/playground 28.92 MB -707 B (-0.0%) 51.8 kB no change
@module-federation/utilities 107.6 kB +4.1 kB (+4.0%) 227 B no change

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/cli 2.3 kB -1 B (-0.0%) 2.4 kB -32 B (-1.3%)
@module-federation/core 1.0 kB -5 B (-0.5%) 1.0 kB -34 B (-3.1%)
@module-federation/devtools 30.3 kB -1 B (-0.0%) 30.3 kB -24 B (-0.1%)
@module-federation/enhanced 2.7 kB +9 B (+0.3%) 2.8 kB -44 B (-1.5%)
@module-federation/manifest 5.5 kB +19 B (+0.3%) 5.5 kB +19 B (+0.3%)
@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 -28 B (-0.3%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 21.4 kB -11 B (-0.1%) 23.0 kB -21 B (-0.1%) +1.6 kB -10 B

Total dist (raw): 35.70 MB (+3.6 kB (+0.0%))
Total ESM gzip: 122.9 kB (no change)
Total web bundle (gzip): 251.5 kB (+23 B (+0.0%))
Total node bundle (gzip): 254.2 kB (-169 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.

@chenjiahan
chenjiahan merged commit a5633f8 into module-federation:main Jul 14, 2026
20 checks passed
@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