module-federation/module-federation-examples

How to resolve the issue where the remote project depends on Redux, but the project using Module Federation does not use Redux?

Opened this issue · 2 comments

How to resolve the issue where the remote project depends on Redux, but the project using Module Federation does not use Redux?

@prpr2012 you can add redux to your module federation as well. but if you don't want to install it on the host then you can isolate your redux on your remote app too.
you probably have reducer provided and store on remote app.tsx or bootstrap.tsx or any initizer which you haven't exposed.
so expose the one that has redux provider and store as well.

Youd need to self-wrap it in a provider or have the host wrap a generic provider around itself