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.
-
A federated container has the following interface:
I am using the package
@module-federation/runtime
in 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.js
in the network tabIf one looks at the
init
function, it's not using thesharedScope
object that's passed down to it. The@module-federation/runtime
package doesn't provide any APIs to use thesharedScope
object passed down to it (unless I am missing something)init
doesn't have thesharedScope
argument ?globalThis.__FEDERATION__.__SHARE__
to store all the shared modules, so isn't there no opportunity for an external/higher-order-entity to provide/inject thesharedScope
object ?Beta Was this translation helpful? Give feedback.
All reactions