Skip to content

fix(runtime): resolve instances from global registry and remote context#4396

Draft
ScriptedAlchemy wants to merge 29 commits intomainfrom
cursor/module-federation-nextjs-bug-75bf
Draft

fix(runtime): resolve instances from global registry and remote context#4396
ScriptedAlchemy wants to merge 29 commits intomainfrom
cursor/module-federation-nextjs-bug-75bf

Conversation

@ScriptedAlchemy
Copy link
Member

@ScriptedAlchemy ScriptedAlchemy commented Feb 9, 2026

Summary

  • improve runtime API instance lookup by resolving from global federation instances when module state is reset
  • support remote-aware instance matching for loadRemote execution paths
  • add API tests covering getInstance and createInstance behavior after module reset

Changed Packages

  • @module-federation/runtime

Changesets

  • .changeset/ten-hounds-kick.md (@module-federation/runtime: patch)

Base

  • main

@cursor
Copy link

cursor bot commented Feb 9, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@netlify
Copy link

netlify bot commented Feb 9, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 5227713
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69a937e06eeded00080a5744
😎 Deploy Preview https://deploy-preview-4396--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

changeset-bot bot commented Feb 9, 2026

🦋 Changeset detected

Latest commit: 5227713

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/runtime Patch
@module-federation/devtools Patch
@module-federation/data-prefetch Patch
@module-federation/dts-plugin Patch
@module-federation/metro Patch
@module-federation/modern-js-v3 Patch
@module-federation/modern-js Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/retry-plugin Patch
@module-federation/runtime-tools Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/enhanced Patch
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/metro-plugin-rnef Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider Patch
@module-federation/rsbuild-plugin Patch
@module-federation/rspack Patch
@module-federation/inject-external-runtime-core-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
remote5 Patch
remote6 Patch
website-new Patch
@module-federation/sdk Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/error-codes 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/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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Bundle Size Report

3 package(s) changed, 38 unchanged.

Package Total dist Delta ESM gzip Delta
vue3-bridge 141.5 kB +3.2 kB (+2.3%) 21.5 kB +303 B (+1.4%)
runtime 20.0 kB +2.8 kB (+16.5%) 954 B +320 B (+50.5%)
inject-external-runtime-core-plugin 5.4 kB -26 B (-0.5%) 548 B no change

Total dist: 6.72 MB (+6.0 kB (+0.1%))
Total ESM gzip: 79.7 kB (+623 B (+0.8%))

@ScriptedAlchemy ScriptedAlchemy changed the title Module federation nextjs bug fix(runtime): resolve instances from global registry Feb 9, 2026
@ScriptedAlchemy ScriptedAlchemy changed the title fix(runtime): resolve instances from global registry fix(runtime): resolve instances from global registry and remote context Feb 12, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 14, 2026

Open in StackBlitz

@module-federation/devtools

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

@module-federation/cli

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

create-module-federation

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

@module-federation/data-prefetch

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

@module-federation/dts-plugin

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

@module-federation/enhanced

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

@module-federation/error-codes

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

@module-federation/esbuild

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

@module-federation/managers

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

@module-federation/manifest

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

@module-federation/metro

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

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

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

@module-federation/metro-plugin-rnef

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

@module-federation/modern-js

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

@module-federation/modern-js-v3

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

@module-federation/native-federation-tests

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

@module-federation/native-federation-typescript

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

@module-federation/nextjs-mf

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

@module-federation/node

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

@module-federation/retry-plugin

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

@module-federation/rsbuild-plugin

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

@module-federation/rspack

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

@module-federation/rspress-plugin

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

@module-federation/runtime

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

@module-federation/runtime-core

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

@module-federation/runtime-tools

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

@module-federation/sdk

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

@module-federation/storybook-addon

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

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

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

@module-federation/treeshake-frontend

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

@module-federation/treeshake-server

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

@module-federation/typescript

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

@module-federation/utilities

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

@module-federation/webpack-bundler-runtime

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

@module-federation/bridge-react

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

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

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

@module-federation/bridge-shared

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

@module-federation/bridge-vue3

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

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

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

commit: 6c25727

@github-actions
Copy link
Contributor

github-actions bot commented Feb 14, 2026

Android Release APK for all devices

🔗 Download link.

Note: if the download link expires, please re-run the workflow to generate a new build.

Generated at 2026-02-15T22:18:24.362Z UTC

@github-actions
Copy link
Contributor

github-actions bot commented Feb 14, 2026

iOS Release APP for simulators

🔗 Download link.

Note: if the download link expires, please re-run the workflow to generate a new build.

Generated at 2026-02-15T22:14:52.708Z UTC

@2heal1
Copy link
Member

2heal1 commented Feb 24, 2026

Does this pr ready to view?

ScriptedAlchemy and others added 4 commits February 24, 2026 13:53
Resolve the dts-plugin TYPE-001 failure by correcting package entry paths for
workspace dependencies and updating RawSource usage for webpack typings.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore sdk and error-codes export paths to the filenames emitted by the
current build so CI package resolution no longer fails on these branches.

Co-authored-by: Cursor <cursoragent@cursor.com>
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