Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remotes initialized but is empty in other containers (federation runtime) #903

Open
hosseinmd opened this issue Jan 29, 2025 · 4 comments
Open
Labels
status:new New issue, not reviewed by the team yet. status:stale Missing feedback or response for prolonged period of time. type:bug A bug report.

Comments

@hosseinmd
Copy link
Contributor

Describe the bug

i have called init method of federation runtime in main container(or host)
import { init } from '@module-federation/runtime';
other containers doesn't know what the remotes are initialized in main container for solving this i add a patch to @module-federation/runtime-core

-            remotes: [],
+            remotes: CurrentGlobal.__FEDERATION__?.remotes || [],
             shared: {},

dev mode working after this change

System Info

"@module-federation/enhanced": "0.8.7",

Re.Pack Version

5.0.0-rc.5

Reproduction

https://github.com/callstack/super-app-showcase

Steps to reproduce

in super-app-showcase remove remotes from ModuleFederationPluginV2 of all containers and add an init in host

@hosseinmd hosseinmd added status:new New issue, not reviewed by the team yet. type:bug A bug report. labels Jan 29, 2025
@jbroma
Copy link
Member

jbroma commented Jan 29, 2025

@hosseinmd what is the issue here that is related to Re.Pack and not MF on it's own?

@hosseinmd
Copy link
Contributor Author

i made an issue in module federation repo module-federation/core#3466 please don't close this to further discussion.

@hosseinmd
Copy link
Contributor Author

Just webpack has this issue. rspack working correctly

Copy link

github-actions bot commented Mar 1, 2025

This issue has been marked as stale because it has been inactive for 30 days. Please update this issue or it will be automatically closed in 14 days.

@github-actions github-actions bot added the status:stale Missing feedback or response for prolonged period of time. label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:new New issue, not reviewed by the team yet. status:stale Missing feedback or response for prolonged period of time. type:bug A bug report.
Projects
None yet
Development

No branches or pull requests

2 participants