Choosing Monorepos for Microfrontends
After going through the pros and cons of polyrepos and monorepos, which one would you choose to use for your project? Well, you can choose either one of them and build microfrontends. Like all things in programming, there are trade-offs for every decision you make, and you need to be clear about what trade-offs you are comfortable with.
For the rest of this book, we will choose to go with the monorepo setup for the following reasons:
- With monorepos, team members are naturally encouraged to collaborate by learning and reviewing each other’s code.
- It allows all teams to easily use a shared library of components. This ensures that each micro-app built as part of the overall app has the same look and feel and the overall user experience is consistent as the user interacts with the different micro-apps.
- It also makes it easy for central platform teams, such as the DevOps team or admin team, to easily refactor code across all...