What is the difference between lib
and get
in @module-federation/runtime
?
#2766
Unanswered
marcinkurka97
asked this question in
Q&A
Replies: 1 comment
-
Lib is synchronous, once it's loaded or an eager factory function. Get is asynchronous, still needs to load the factory. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey 👋
I'm using
@module-federation/[email protected]
to dynamically load remotes in a runtime.But I'm having troubles understanding different sharing options in runtime
init
configuration.A couple of questions have emerged while working with MF runtime:
@module-federation/runtime
?lib
andget
? How do they work exactly?lib
andget
are passed toinit
?window.__FEDERATION__
, but how to be sure that there's a single instance of the module fetched, and reused by both parties?I would really appreciate some clarification, because I couldn't get those answers from the docs.
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions