How to Use createInstance for Pure Runtime-only Setup? Example Needed (Shared Scope Always Empty) #4379
-
Can someone provide a clear example of how to use createInstance from @module-federation/enhanced/runtime for a pure runtime-only setup (no Webpack ModuleFederationPlugin at build time)? When I try to use createInstance in my own setup, the shared scope is always empty, and React gets loaded multiple times. I’m not sure if I’m missing an initialization step or not. I've created a repo for my problem here: https://github.com/GururajChadaga/mf-dynamic-remotes-pure-runtime And I've also described the issue on the core repo: module-federation/core#4071 Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
answered in the aforementioned issue. TLDR - createInstance API expects a getter function which must return the imported shared dependency |
Beta Was this translation helpful? Give feedback.
answered in the aforementioned issue. TLDR - createInstance API expects a getter function which must return the imported shared dependency