Understand Monorepo with PNPM, NPM & YARN workspaces
Monorepos are hot right now, especially among Web developers. We created this resource to help developers understand what monorepos are, what benefits they can bring, and the tools available to make monorepo development delightful.
There are many great monorepo tools, built by great teams, with different philosophies. We do our best to represent each tool objectively, and we welcome pull requests if we got something wrong!
The tools we'll focus on are: Bazel (by Google), Gradle Build Tool (by Gradle, Inc), Lage (by Microsoft), Lerna, Nx (by Nrwl), Pants (by the Pants Build community), Rush (by Microsoft), and Turborepo (by Vercel). We chose these tools because of their usage or recognition in the Web development community.
A mono repo is a single repository containing multiple distinct projects, with well-defined relationships.
We at Nrwl think this is the most consistent and accurate statement of what a mono repo is among all the established mono repo tools.
What mono repo tools should provide?
Monorepos have a lot of advantages, but to make them work you need to have the right tools. As your workspace grows, the tools have to help you keep it fast, understandable and manageable.
Local computation caching
Local task orchestration
Distributed computation caching
Distributed task execution
Transparent remote execution
Detecting affected projects/packages
Workspace analysis
Understandable
Dependency graph visualization
Understandable
Code sharing
Manageable
Consistent tooling
Manageable
Code generation
Manageable
Project constraints and visibility
Comments