-
Notifications
You must be signed in to change notification settings - Fork 242
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
Empty window.__federation_shared__
#448
Comments
Anyone there? :) |
Anyone there? dependencies are not being shared as of today |
My solution is that I am betting module federation on a new bundler called Rspack as it’s getting a new webpack modeller federation 1.1. Module federation seems to be still in an infancy stage in vite therefore I ll be building MFE on a framework called Modern JS |
Hello.
Read lot of comment around the issue, tried to combine all gathered information into dynamic remotes loader, it's too hard.
Faced with the problem that
window.__federation_shared__
is not filling before the remotes tried to be initialized.What I found is build generates the needed hash-map called
moduleMap
:But I can't have access to the map in runtime.
Tried the way @foot wrote in the issue above:
Now it loads the remote component, but it fails because shared
react
wasn't loaded.I've made research in built files and see that it loads
react
chunk, dev-tool confirms alsoLet's look at the loader:
Looks like it loads all shared libraries, but doesn't store them into the shared state
globalThis?.__federation_shared__?.[shareScope]
.Isn't it wrong behaviour?
The text was updated successfully, but these errors were encountered: