module-federation / practical-module-federation

75 stars 23 forks source link

Charter 5 - analyticsBus does not seem to work #24

Open CharidimosTzedakis opened 2 years ago

CharidimosTzedakis commented 2 years ago

On the 1.3 version of the book, on page 69, section: Using RxJS as an Analytics Bus we create an analytics.js module in the home app.

Then we expose it via:

exposes: {
"./analytics": "./src/analytics",
},

in the webpack.config.js of the home app.

Then it is suggested that we can import it in the home app via: import analyticsBus from "home/analytics"; to ensure that both the App component and the Header component get exactly the same analytics subject.

This however does not seem to work, giving the error: image