jherr / wp5-dashboard Goto Github PK
View Code? Open in Web Editor NEWPie chart dashboard using Webpack 5 Federated Modules
Pie chart dashboard using Webpack 5 Federated Modules
Hi @jherr ,
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 :-)
Here is the repo to reproduce the issue
https://github.com/tsukhu/wp5-dashboard
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.