Replies: 2 comments 3 replies
-
|
To add more context in the type of errors and incompatibilities we are facing, sometimes when we publish a new module and are still using the old version of the super app, we often find errors like: When we make a new build of the super app and load the micro app there, it works fine. There seems to be some issue loading the bundle that causes some values to be undefined for a "initial load" when they should never be actually undefined There should not be any difference in the versions of dependencies between all of these releases but, there is some problem that is making releasing versions of micro app that can be used across multiple versions of the host very hard. |
Beta Was this translation helpful? Give feedback.
-
|
Right now we are working on a more rigorous management and versioning system on our backend to ensure compatibility between host and modules. But i`m still looking for advise into ensure the error boundary works as expected and the app never crashes because of module federation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
We are rolling out re.pack and slowly turning our micro apps into federated modules on our production project, one problem we often come across is handling compatibility between our MFs and our dependencies.
We have tried different approaches with shared dependencies on all deps vs only a few, all MFs having eager deps vs not eager, and even passing import as false to reduce the amount of files generated on the bundling step.
What we have found extremely complex is making sure the app does not crash when for example a user is using a MF that still has react 18 vs react 19 from the current super app version.
Or let`s say a UI library has changed the API of a button component and now only because of that our micro app and super app are now incompatible and may crash when loading.
Overall what we have found the most trouble with is stopping the app from crashing when these compatibility issues happen. It is important the ErrorBoundary catches the issue and the app does not crash.
Even with a plugin to hopefully handle errors outside the ErrorBoundary there are still crashes in the app
Are there better ways of handling these compatibility issues, or maybe a way to ensure the app does not crash?
Beta Was this translation helpful? Give feedback.
All reactions