Is the sharedScope object passed to the init function of a container obsolete now ? #2051
Replies: 1 comment 2 replies
-
|
Thanks for trying to use mf runtime in rollup esm ! Let me answer the two question:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A federated container has the following interface:
I am using the package
@module-federation/runtimein my rollup-plugin-module-federation and everything works fine.It generates the remote entry for the examples/project-b
Working example: https://rollup-plugin-module-federation-project-a.vercel.app/rollup/esm
- Inspect any of the
my-remote-entry.jsin the network tabIf one looks at the
initfunction, it's not using thesharedScopeobject that's passed down to it. The@module-federation/runtimepackage doesn't provide any APIs to use thesharedScopeobject passed down to it (unless I am missing something)initdoesn't have thesharedScopeargument ?globalThis.__FEDERATION__.__SHARE__to store all the shared modules, so isn't there no opportunity for an external/higher-order-entity to provide/inject thesharedScopeobject ?Beta Was this translation helpful? Give feedback.
All reactions