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) #3466

Open
5 tasks done
hosseinmd opened this issue Jan 29, 2025 · 0 comments
Open
5 tasks done

Comments

@hosseinmd
Copy link

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

to repreduce
https://github.com/callstack/super-app-showcase
in super-app-showcase remove remotes from ModuleFederationPluginV2 of all containers and add an init in host

Reproduction

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

Used Package Manager

npm

System Info

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

Validations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant