Monorepos — single repositories containing multiple packages or applications — are standard practice at companies of every size. The tooling debate has shifted from “should we use a monorepo?” to “which tools work best?”

The Core Problems

A monorepo tool needs to solve:

  1. Task orchestration. Run builds/tests across packages in the right order, respecting dependencies.
  2. Caching. Don’t rebuild what hasn’t changed. Remote caching shares results across CI and developers.
  3. Affected analysis. When a file changes, determine which packages are affected.
  4. Dependency management. Keep internal and external dependencies in sync.

Turborepo

Vercel’s entry. Focused on simplicity and speed.

{
  "tasks": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": ["dist/**"]
    },
    "test": {
      "dependsOn": ["build"]
    },
    "lint": {}
  }
}

Strengths: Minimal configuration, fast remote caching, easy adoption. Integrates well with Vercel deployments.

Trade-offs: Less powerful dependency graph analysis than Nx. Fewer built-in generators and plugins.

Nx

The most feature-rich option. Originally Angular-focused, now framework-agnostic.

Strengths: Sophisticated dependency graph, powerful code generators, extensive plugin ecosystem, module boundary enforcement.

Trade-offs: Steeper learning curve. More configuration. Can feel heavy for simple repos.

pnpm Workspaces

Not a build orchestrator, but pnpm’s workspace support handles dependency management well:

# pnpm-workspace.yaml
packages:
  - "apps/*"
  - "packages/*"

Pair pnpm workspaces with Turborepo or Nx for a complete solution. pnpm’s strict dependency resolution also catches phantom dependency issues that npm and yarn miss.

Practical Advice

  1. Start simple. pnpm workspaces + Turborepo handles most needs.
  2. Set up remote caching early. The CI time savings compound immediately.
  3. Enforce package boundaries. Unrestricted imports between packages eventually create a tangled mess.
  4. Use consistent tooling. Every package should use the same test runner, linter, and build tool.
  5. Automate versioning. Changesets or conventional commits + release automation save manual coordination.

The monorepo tool doesn’t matter as much as the practices around it. Consistent conventions, enforced boundaries, and fast CI are what make monorepos work at scale.