You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really liked this approach where you can dynamically load Module Federation WP5 components into an existing app that currently is using the older version of webpack . But looks like that the internal implementation of Module Federation has changed, due to which the overrides logic does not work anymore and we get this error in the dashboard app
TypeError: window[scope].override is not a function
RemoteReactComponent
C:/workspace/tkdash/wp5-dashboard/dashboard/src/App.js:52
49 |
50 | if (ready) {
51 | const o = global.__webpack_require__ ? global.__webpack_require__.o : {};
> 52 | window[scope].override(
| ^ 53 | Object.assign(
54 | {
55 | recoil: () => Promise.resolve().then(() => () => require("recoil")),
I tried to look at the new remotes that are generated but was not able to figure this one out. It would be great if you can shed some light on this as the mode of dynamically loading Module federation remotes was a great idea 💡
To demonstrate this I have forked your project and upgraded the webpack version to the latest version. Also made some minor tweaks to make it work on a Windows machine :-)