practical-module-federation icon indicating copy to clipboard operation
practical-module-federation copied to clipboard

Charter 5 - analyticsBus does not seem to work

Open CharidimosTzedakis opened this issue 3 years ago • 0 comments
trafficstars

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

CharidimosTzedakis avatar May 26 '22 16:05 CharidimosTzedakis