...
Example: Publishing MFEs as NPM Packages One common approach for build-time integration is to publish each MFE as a standalone NPM package. The container application can then import and use these packages as dependencies during its own build process. This allows the container to access the MFE code and integrate it directly.
In the case of Chrome Extensions, build-time integration through approaches like NPM package publication would likely be a more suitable and compatible integration strategy.
Drawbacks:
Frequent Redeployments: The container application needs to be rebuilt and redeployed every time an NPM package (MFE) is updated. This can lead to more frequent deployments of the entire application, even for small changes in individual MFEs.
Risk of Tight Coupling: There's a temptation to tightly couple the container with the NPM packages. This can undermine the modularity and independence that micro-frontends aim to achieve, potentially leading to a more monolithic architecture over time.
These drawbacks highlight the importance of carefully managing dependencies and maintaining clear boundaries between MFEs when using build-time integration.