Sharing all or nothing
We’ve touched on this point a couple of times already: should we share all dependencies or no dependencies? Coming from a microservice background, you might tend to share nothing, and you will have several good reasons for doing this. After all, sharing anything will lead to constraints and potential bugs.
On the other hand, if you need to include all dependencies in every micro frontend, the whole solution could become bloated and quite slow. It will also be unable to leverage some of the more advanced communication patterns.
This is another example of where the truth lies in the middle. Now the question is, how should you decide what dependencies to share? Generally, you should not share any dependency. Going with this default choice makes your life much simpler. Also, making a mistake by not sharing a dependency hurts less than making a mistake by sharing a dependency.
Great! Now that we have settled on a default choice, we still need to figure...