Micro-frontend and shared dependencies
Why share dependencies?
Sharing core dependencies reduces the code to be maintained and the duplication, but it implies a higher level of interaction between independent teams.
What dependencies to share?
Patterns that enable this type of composition and still allow for a certain level of independence are those that exercise a high degree of abstraction of common assets, such as shared stylesheets or modularized, independent common and helper utlilities, typically published to a registry such as npm.
How to share dependencies?
Those common assets are typically developed and maintained by a core team that is in charge of a wrapping shell. They’re typically versioned in order to avoid introducing breaking changes.
The teams in charge of the shared assets, may choose to work on a centralized monorepo, even when each micro-application is independently built and deployed.