aurelia / webpack-plugin

A plugin for webpack that enables bundling Aurelia applications.
MIT License
90 stars 36 forks source link

Webpack + moduleFedrationPlugin + translations of shared components not working #220

Open DhitiChavda opened 1 year ago

DhitiChavda commented 1 year ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: When used ModuleFedrationPlugin container to share the component from App1 to App2, translations are not been translated and only Keys are visible in App2 UI App1 webpack looks like :

Screenshot 2023-05-08 at 5 08 27 PM

App2 webpack looks like:

Screenshot 2023-05-08 at 5 10 52 PM

Components in App2 (from App1) looks like

Screenshot 2023-05-08 at 5 12 43 PM Screenshot 2023-05-08 at 5 12 57 PM Screenshot 2023-05-08 at 5 13 08 PM

Expected/desired behavior:

In App2, the shared components should come up with translations and not only key

I even tried adding react-i18next to peerDependencies but it didn't worked

DhitiChavda commented 1 year ago

Current situation: Added a static json file of translations in studio and added them into translations via i18next.addResourceBundle, though key is added and can translate keys in browser console, shared components are not reflecting them.

Screenshot 2023-05-08 at 5 24 50 PM
bigopon commented 1 year ago

Thanks @DhitiChavda , I suspect that this is because the plugin currently doesn't consider modules being exported via the ModuleFederation plugin. I probably can have a look sometime soon, been on my mind recently.