You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an main (React) app with many separated sub-apps inside.
I learned about module federation today and thought it might be perfect for this project.
I'm planning to build the app to static html and js files, and host the site at for example firebase hosting.
Will it work? Or do I need a server / cloud function to serve the main app and sub-apps for module federation to work?
The main app is basically layouts, themes and navigations, and the sub-apps do their own jobs and do not communicate to each other.
So the main app imports sub-apps from remote and renders based on the routes.
What if I have some custom components that used by all sub-apps? Do I have to place the shared components to all sub-apps' repo, or is it possible for sub-apps to import the shared components from main app?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have an main (React) app with many separated sub-apps inside.
I learned about module federation today and thought it might be perfect for this project.
I'm planning to build the app to static html and js files, and host the site at for example firebase hosting.
Will it work? Or do I need a server / cloud function to serve the main app and sub-apps for module federation to work?
The main app is basically layouts, themes and navigations, and the sub-apps do their own jobs and do not communicate to each other.
So the main app imports sub-apps from remote and renders based on the routes.
What if I have some custom components that used by all sub-apps? Do I have to place the shared components to all sub-apps' repo, or is it possible for sub-apps to import the shared components from main app?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions