Why is it necessary / beneficial to dynamically load a remote module? #2042
-
Hello, I'm trying to set up shared redux through the redux injection example, but I can't really get around to understand why the host application needs dynamicFederation function to load the remote modules. I referring to this bootstrap file in host. Wouldn't Thanks!! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Shared modules are async be default. So you need a dynamic import before you try and static import a stared module otherwise webpack can't pause the app to negotiate dependencies |
Beta Was this translation helpful? Give feedback.
-
could we do the load of the modules(not the build time,but runtime), fetching from a remote config, out of the box without write some document head script loader tool? |
Beta Was this translation helpful? Give feedback.
-
Adding api to federation runtime to allow registerRemote: module-federation/core#2171 You should no longer use utilities package as /runtime has all the things you want or need now https://github.com/module-federation/universe/tree/main/packages/runtime |
Beta Was this translation helpful? Give feedback.
Shared modules are async be default. So you need a dynamic import before you try and static import a stared module otherwise webpack can't pause the app to negotiate dependencies