Skip to content

fix(runtime-core): keep loadEntry hook when remotes are disabled - #5143

Open
ScriptedAlchemy wants to merge 3 commits into
mainfrom
fix/disabled-remote-shared-fallback
Open

ScriptedAlchemy wants to merge 3 commits into
mainfrom
fix/disabled-remote-shared-fallback

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

With experiments.optimization.disableRemote: true, a shared tree-shaking fallback entry failed while loading because getRemoteEntry emitted a loadEntry hook that DisabledRemoteHandler did not define. The handler now keeps that hook, allowing fallback entries to load through the platform loader or a runtime plugin while remote loading remains disabled.

The regression tests cover the platform loader, the runtime plugin hook, and the webpack bundler's shared fallback getter through entry init() and get() to the consumer value. The new consumer test fails with the original undefined.emit error before the fix and passes with it.

Validation: Node 24 and pnpm 10.28.0; pnpm --filter @module-federation/runtime-core run test (130 passed), build, lint, and pnpm exec prettier --check . passed. Dependency install used --frozen-lockfile --ignore-scripts after unrelated Cypress postinstall stalled; Cypress binary and install scripts were not needed for these checks. Workspace-wide builds, E2E, and CI were not run locally.

@changeset-bot

changeset-bot Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 226ec31

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

This PR includes changesets to release 48 packages
Name Type
@module-federation/runtime-core Patch
@module-federation/nextjs-mf Patch
@module-federation/runtime Patch
@module-federation/bridge-react Patch
@module-federation/devtools Patch
@module-federation/dts-plugin Patch
@module-federation/esbuild Patch
@module-federation/metro Patch
@module-federation/modern-js-v3 Patch
@module-federation/modern-js Patch
@module-federation/node Patch
@module-federation/observability-plugin Patch
@module-federation/playground Patch
@module-federation/retry-plugin Patch
@module-federation/runtime-tools Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/bridge-vue3 Patch
website-new Patch
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/metro-plugin-rnef Patch
@module-federation/metro-plugin-rock Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider Patch
@module-federation/rsbuild-plugin Patch
@module-federation/rstest Patch
node-dynamic-remote-new-version Patch
node-dynamic-remote Patch
@module-federation/enhanced Patch
@module-federation/rspack Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/rspress-plugin Patch
remote5 Patch
remote6 Patch
@module-federation/storybook-addon Patch
shared-tree-shaking-no-server-host Patch
shared-tree-shaking-no-server-provider Patch
@module-federation/cli Patch
create-module-federation Patch
@module-federation/error-codes Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/sdk Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/treeshake-frontend Patch
@module-federation/treeshake-server Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/bridge-shared 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T14:56:00.388149Z 291cd12 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

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

@module-federation/cli

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

create-module-federation

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

@module-federation/dts-plugin

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

@module-federation/enhanced

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

@module-federation/error-codes

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

@module-federation/esbuild

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

@module-federation/managers

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

@module-federation/manifest

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

@module-federation/metro

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

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

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

@module-federation/metro-plugin-rnef

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

@module-federation/metro-plugin-rock

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

@module-federation/modern-js

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

@module-federation/modern-js-v3

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

@module-federation/native-federation-tests

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

@module-federation/native-federation-typescript

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

@module-federation/nextjs-mf

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

@module-federation/node

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

@module-federation/observability-plugin

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

@module-federation/playground

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

@module-federation/retry-plugin

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

@module-federation/rsbuild-plugin

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

@module-federation/rspack

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

@module-federation/rspress-plugin

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

@module-federation/rstest

pnpm add https://pkg.pr.new/@module-federation/rstest@226ec31

@module-federation/runtime

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

@module-federation/runtime-core

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

@module-federation/runtime-tools

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

@module-federation/sdk

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

@module-federation/storybook-addon

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

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

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

@module-federation/treeshake-frontend

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

@module-federation/treeshake-server

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

@module-federation/typescript

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

@module-federation/utilities

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

@module-federation/webpack-bundler-runtime

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

@module-federation/bridge-react

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

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

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

@module-federation/bridge-shared

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

@module-federation/bridge-vue3

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

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

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

commit: 226ec31

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Bundle Size Report

22 package(s) changed, 21 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/bridge-vue3 191.7 kB +35 B (+0.0%) 27.4 kB +11 B (+0.0%)
@module-federation/dts-plugin 336.0 kB +369 B (+0.1%) 4.7 kB no change
@module-federation/enhanced 819.3 kB +1.6 kB (+0.2%) 672 B no change
@module-federation/esbuild 255.8 kB +692 B (+0.3%) 67 B no change
@module-federation/inject-external-runtime-core-plugin 5.2 kB no change 518 B -1 B (-0.2%)
@module-federation/managers 70.7 kB no change 243 B -1 B (-0.4%)
@module-federation/modern-js 201.0 kB no change 1.2 kB +1 B (+0.1%)
@module-federation/native-federation-tests 93.3 kB +101 B (+0.1%) 745 B no change
@module-federation/native-federation-typescript 91.8 kB +101 B (+0.1%) 629 B no change
@module-federation/observability-plugin 480.8 kB +61 B (+0.0%) 150 B no change
@module-federation/playground 16.08 MB -346 B (-0.0%) 45.8 kB no change
@module-federation/retry-plugin 44.3 kB +96 B (+0.2%) 2.9 kB no change
@module-federation/runtime-core 310.7 kB +219 B (+0.1%) 570 B no change
@module-federation/storybook-addon 80.7 kB +201 B (+0.2%) 100 B no change
@module-federation/third-party-dts-extractor 20.1 kB +10 B (+0.0%) 2.0 kB no change
@module-federation/treeshake-frontend 626.5 kB -5 B (-0.0%) 0 B no change
@module-federation/treeshake-server 774.2 kB -5 B (-0.0%) 124 B no change

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/bridge-vue3 20.0 kB +3 B (+0.0%) 20.2 kB +4 B (+0.0%)
@module-federation/cli 2.3 kB +7 B (+0.3%) 2.4 kB -32 B (-1.3%)
@module-federation/core 1.0 kB -4 B (-0.4%) 1.0 kB -33 B (-3.0%)
@module-federation/devtools 30.3 kB -6 B (-0.0%) 30.3 kB -28 B (-0.1%)
@module-federation/enhanced 2.7 kB +5 B (+0.2%) 2.8 kB -43 B (-1.5%)
@module-federation/metro-plugin-rnc-cli 416 B -1 B (-0.2%) 435 B -26 B (-5.6%)
@module-federation/modern-js 5.1 kB +1 B (+0.0%) 5.1 kB +1 B (+0.0%)
@module-federation/node 9.1 kB +4 B (+0.0%) 9.1 kB -28 B (-0.3%)
@module-federation/runtime-core 16.2 kB +8 B (+0.0%) 15.8 kB +7 B (+0.0%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 22.3 kB -19 B (-0.1%) 23.8 kB -6 B (-0.0%) +1.6 kB +13 B

Total dist (raw): 23.41 MB (+3.1 kB (+0.0%))
Total ESM gzip: 111.7 kB (+10 B (+0.0%))
Total web bundle (gzip): 253.3 kB (+17 B (+0.0%))
Total node bundle (gzip): 255.5 kB (-178 B (-0.1%))
Tracked ./bundler entry gzip: 563 B (no change)
Tracked ./bundler web bundle (gzip): 4.9 kB (no change)
Tracked ./bundler node bundle (gzip): 4.9 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.

This branch has not been deployed

No deployments
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.

1 participant