Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DhitiChavda opened this issue May 8, 2023 · 2 comments

Comments

@DhitiChavda
Copy link

I'm submitting a bug report

  • Library Version:
    major.minor.patch-pre
    5.72.0

Please tell us about your environment:

  • Operating System:
    macOs Ventura 13.1

  • Node Version:
    6.2.0

14.19.3

  • NPM Version:
    6.14.7
  • JSPM OR Webpack AND Version
    webpack 5.72.0
  • Browser:
    all

  • Language:
    TypeScript X4.6.3

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

  • What is the expected behavior?
    The shared components should come up with translations and not only key

  • What is the motivation / use case for changing the behavior?
    translationd not coming up

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

@DhitiChavda
Copy link
Author

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
Copy link
Member

bigopon commented May 8, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants