DevopsIntermediate

Nx vs Turborepo vs Bazel: Monorepo Tooling in 2026

DeveloperHat Team
14 min read

TL;DR

Nx 24, Turborepo 2.11 and Bazel 9 attack the same monorepo problem three ways. Compare them on repo size, language mix and caching, then pick.

Every monorepo eventually hits the same wall: CI runs everything on every change, so a one-line fix in a shared library waits forty minutes behind tests for code it never touched. The three tools in this article all solve that wall — by figuring out what changed, what depends on it, and what can be replayed from cache instead of rebuilt. They solve it at very different prices, and the wrong one costs more than the wall did.

Versions in this article are verified against the primary sources as of 23 November 2026: Nx 24.0.6 (stable, 10 November 2026), Turborepo 2.11.13 (latest patch, 18 November 2026; 2.11 released 18 September 2026), and Bazel 9.3.3 LTS (19 November 2026; Bazel 9 released 20 January 2026, supported through 31 December 2028). If you are reading this later, check the release notes — all three ship monthly.

The short version: Turborepo is the fastest way to make a small JavaScript monorepo fast. Nx is the choice when a JavaScript/TypeScript repo gets big enough to need generators, affected runs, and a real CI strategy. Bazel is the choice when the repo is polyglot and the build itself has to be provably reproducible. Everything below is the evidence for those three sentences.

One repo, one graph, one cache Every change enters the same pipeline; only the affected tasks run. Single repo apps + packages Task graph dependsOn, affected Cache hash inputs + outputs Outputs built, tested, shipped CI: only affected tasks run the whole point The cache is the product: without it, a monorepo is just a big repo with slow CI.

What problem are you actually solving?

A monorepo without tooling is just a big repo with slow CI. The tooling earns its keep on three jobs, and you should judge each tool on how well it does each one:

  • Affectedness. Given a change, which tasks actually need to run? A good tool answers this from the dependency graph, not from folder paths. Folder-based guessing breaks the moment a shared package changes.
  • Caching. Given a task and its inputs, has this exact work been done before — on this machine, or any machine? A cache keyed on the wrong inputs is worse than no cache: it ships stale output with confidence.
  • Distribution. When the work cannot be cached, can it be split across machines and run in parallel, respecting the dependency order?
  • There is a fourth job that only matters at scale, and it is the one that separates these tools most sharply: who defines the build. Turborepo and Nx mostly orchestrate the tools you already use — tsc, jest, vite — and cache their results. Bazel replaces them with its own build language, so the build itself becomes a declared, hermetic graph. That is a bigger commitment, and it buys things the other two cannot.

    A word on what "monorepo tooling" is not: it is not the decision to have a monorepo. If your services have separate deploy cycles, separate owners, and no shared code, the tool will not fix the organisational mismatch. Our platform engineering guide covers the team side of that decision; this article is about the build side, once the repo decision is made.

    Nx 24: the full platform for JavaScript and TypeScript

    Nx is the oldest and broadest of the three. It started as a task runner and grew into a platform: generators that scaffold apps and libraries, a project graph derived from your imports and config, affected analysis, caching, and a managed remote-cache and distribution service (Nx Cloud) that can be self-hosted.

    Nx 24, announced on the Nx blog, makes task-based affected the default. Instead of deciding affectedness at project granularity — "this project changed, run all its tasks" — it decides per task, from each task's inputs and outputs, the same way caching already worked. The same release adds dynamic task packing, which profiles each task's CPU and memory use and packs more tasks onto each CI machine, and Ultracache, which learns what files a task actually reads in CI and hashes from that, so a wrong hand-written inputs entry can no longer cause false cache hits. Nx reports the combination at 9.2x faster CI with 52% less compute on its 511-project benchmark — its own numbers, on its own benchmark, so treat them as a ceiling, not a promise.

    Two smaller Nx 24 features matter in practice. waitFor lets a task wait until a continuous task it depends on — usually a dev server — is ready, instead of guessing with a sleep; inferred Cypress and Playwright e2e tasks do this by default. And fine-grained e2e caching lets Nx cache individual spec files based on the code they test, which is the difference between re-running a whole suite and re-running two specs.

    The cost of Nx is the cost of a platform. The 24.0 release removes 35 built-in executors deprecated in Nx 23, so workspaces still on executor-based configs must migrate to inferred tasks first — the migration is scripted, but it is real work, and it is the price of the breadth. Nx is JavaScript/TypeScript-first; it has Gradle and Maven support for Java, but a polyglot repo will always feel like a guest in Nx. And the most valuable parts — remote caching, distribution, the self-healing CI features — are Nx Cloud, which is a paid product whether managed or self-hosted. Budget for that before you commit.

    Turborepo 2.11: the fast, narrow tool — now speaking more languages

    Turborepo does less than Nx and does it with less configuration. You declare tasks in turbo.json, Turborepo builds the graph, runs tasks in parallel respecting dependencies, and caches on content hashes — locally, and remotely via Vercel Remote Cache or a self-hosted remote cache. There are no generators and no framework-specific plugins; the tool stays out of your code.

    Turborepo 2.11, released 18 September 2026, is the release that changes the "narrow" label. It adds native support for Rust, Python, and Go — Turborepo discovers packages and dependencies from Cargo, uv, and go.work workspaces and puts every language toolchain into one task graph, so a single turbo run test can run vitest, cargo test, pytest, and go test in parallel, respecting cross-language dependencies. The support is still marked experimental, and it is: treat it as a real capability with a changing surface, not a finished contract. The same release makes time to first task up to 4x faster than 2.9, adds production pruning (turbo prune web --production excludes dev-only workspace packages from deploy images), and respects the modern devEngines.packageManager field in package.json.

    Turborepo's honest limit is scope. It will not generate your code, it will not tell you how to structure the repo, and it will not manage your releases beyond its turbo task model. For a small team that is a feature — there is almost nothing to learn, and the migration from npm scripts is an afternoon. For a large organisation that wants conventions enforced, it is a gap you will fill yourself, with documentation and code review, or by moving to Nx later.

    Bazel 9: hermetic builds for polyglot repos

    Bazel is a different kind of tool. You do not point it at your existing build scripts; you declare targets in BUILD files, and Bazel builds a graph of actions with declared inputs and outputs, sandboxes each action, and caches and distributes them. The result is a build that is reproducible by construction: the same inputs produce the same outputs on any machine, and Bazel can prove it. Nothing else in this article offers that.

    Bazel 9 is the current LTS line — 9.3.3, released 19 November 2026, with support through 31 December 2028. The 9.0 line removed the legacy WORKSPACE system in favour of Bzlmod for external dependencies, so new Bazel projects start on Bzlmod and older ones migrate. The LTS model matters here: Bazel majors are long-lived, and the rolling releases carry the new features. For production, pin an LTS.

    The price is the highest of the three, and it is paid in a different currency: expertise. Every language needs rules, every third-party dependency needs a declaration, and the build graph is a codebase of its own that someone has to own. Teams that adopt Bazel without a build engineer end up with a build that only one person understands — which is the failure mode Bazel exists to prevent. Remote execution is the other half of the value: with a remote execution service, Bazel can run thousands of actions in parallel on a cluster, which is how the largest monorepos in the world build in minutes. But that service is a separate system to run or buy; Bazel alone does not provide it.

    The stack, layer by layer

    The monorepo stack — five layers, each one honest or the whole thing lies Workspace layout — apps, packages, shared libs, one lockfile Task graph — dependsOn, affectedness, parallel execution Local cache — content-hash inputs and outputs, instant replays Remote cache + distribution — shared hits, remote execution CI enforcement — affected-only runs, gates, provenance Each layer only works if the one below it is honest — a cache built on wrong inputs is a lie that ships.

    The diagram is the test for any of these tools: if a layer is wrong, the layers above it inherit the error. A task graph built from folder paths instead of real dependencies marks the wrong tasks affected. A cache keyed on the wrong inputs replays stale output. A remote cache that nobody trusts gets bypassed with --force, and then you are paying for a cache and a full build. When you evaluate, check the bottom layers first — they are where the tools actually differ.

    Head-to-head

    Nx 24Turborepo 2.11Bazel 9 LTS
    Primary languagesJS/TS-first; Java via Gradle/MavenJS/TS native; Rust, Python, Go experimentalAny language with rules
    What it isTask runner + generators + affected + CI platformTask runner + cacheHermetic build system
    Affected analysisPer-task, default in 24Per-task via turbo.json inputsThe build graph itself
    CachingLocal + Nx Cloud (Ultracache learns inputs)Local + Vercel or self-hosted remote cacheLocal + remote cache, action-level
    DistributionNx Cloud agents, dynamic task packingRemote cache only (no distributed execution)Remote execution cluster
    Setup costMedium; migration from executors in 24Low; an afternoon from npm scriptsHigh; build graph is a codebase
    Learning curveModerate; Nx concepts + plugin modelLow; one config fileSteep; Starlark, rules, hermeticity
    Cost modelOpen source core; Nx Cloud paidOpen source; Vercel Remote Cache paid tierOpen source; remote execution is separate
    Best forJS/TS repos at scale that want conventionsSmall-to-medium JS repos; now polyglot-curiousLarge polyglot repos needing reproducibility

    The decision

    Which tool earns its keep in your repo? Answer with the repo you have, not the one you imagine in two years. Languages? Repo size? hermetic builds needed? One app, small team npm scripts — no tool JS/TS only, small Turborepo JS/TS at scale Nx — generators, affected Polyglot + hermetic Bazel Revisit when the repo doubles or a second language arrives — the right tool changes with the repo.

  • Pick Turborepo when the repo is JavaScript/TypeScript, the team is small, and the goal is faster CI this week. The migration is reversible: turbo.json sits next to your package scripts, and you can leave with the scripts intact. The experimental Rust/Python/Go support is a reason to watch, not a reason to bet a polyglot repo on it yet.
  • Pick Nx when the JavaScript/TypeScript repo is growing past the point where conventions are enforced by memory — many teams, shared libraries, a CI bill worth optimising. The generators and the affected analysis are the value; the remote cache is the ongoing cost. Plan the executor-to-inferred migration before you upgrade to 24, and budget for Nx Cloud.
  • Pick Bazel when the repo is polyglot, the build must be reproducible, and there is a person or team who will own the build graph. The test is simple: if a wrong build has ever shipped because two machines produced different output from the same commit, Bazel is the only tool here that answers that failure by construction. If that failure has never happened to you, you do not need it yet.
  • Migration: what switching actually costs

    Switching between these tools is not symmetric. Turborepo to Nx is a moderate migration — Nx has a generator for it, and the task graph concepts map across. Nx to Turborepo is a simplification that throws away generators and conventions, so it only makes sense if the team decided Nx was too much. Either direction into Bazel is a rewrite: build definitions move into BUILD files, scripts become actions, and the team's mental model of "how the build works" changes. Budget a quarter, not a weekend, and run Bazel alongside the existing tool on one package first.

    The cheapest migration is the one you do not need. If the repo is one app and two developers, none of these tools earns its keep — npm scripts and a CI cache are enough, and the tooling would be the most complex thing in the repo. That is a fine place to be.

    When not to use any of them

  • One app, one team, one deployable. The graph has one node; affectedness is trivial and the cache is your CI provider's.
  • Repos that change shape every quarter. A build graph you rewrite constantly is a tax; stabilise the layout first, then automate it.
  • Bazel without a build owner. An unowned build graph rots faster than an unowned script, because more of the system depends on it.
  • Nx when the team will not pay for Nx Cloud. The open-source core is real, but the remote cache and distribution are where the large-repo value lives. Self-hosting the remote cache is possible; running it unmaintained is not a plan.
  • And the monorepo decision itself is upstream of all of this: if the services in the repo have separate owners and separate release trains, the tooling will not reconcile that. Decide the repo shape first — ephemeral preview environments and GitOps are the two Cleartechy guides most teams read next, because the monorepo decision changes both how you preview changes and how you deploy them. For the pipeline that runs the tasks these tools produce, see CI/CD Pipelines 101, and for reproducible developer machines across the repo, devcontainers vs Nix.

    Architecture Decision

    >

    Decision: Adopt Turborepo 2.11 for a small JavaScript/TypeScript monorepo today, with Nx as the named upgrade path when the repo passes roughly 20 packages or three teams; reserve Bazel for polyglot repos where a non-reproducible build has already caused a real incident.

    >

    Context: A team runs a JavaScript monorepo of a dozen packages and two services. CI takes 25 minutes on every pull request because it runs every test. The team wants faster feedback without hiring a build engineer or rewriting the build.

    >

    Options considered: (a) Turborepo 2.11 with local and remote caching. (b) Nx 24 with Nx Cloud. (c) Bazel 9 LTS with remote execution. (d) Keep npm scripts and add CI-level caching only. (e) Split the monorepo back into separate repos.

    >

    Why this one: Option (d) is free and stays slow — CI caching without affectedness still runs every test, just with warm dependencies. Option (e) trades a build problem for a versioning and coordination problem and does not make anything faster. Option (c) answers a failure the team has never had, at the price of a build engineer they do not have. Option (b) is the right tool at the wrong size: the generators and affected analysis are valuable, but the team would be paying — in learning and in Nx Cloud — for capacity it does not yet use. Option (a) is reversible in an afternoon, costs almost nothing to try, and the remote cache alone should cut the 25-minute run to the affected subset. The upgrade path to Nx is explicit, not a surprise.

    >

    What it costs you: One config file and the discipline to declare task inputs honestly — a wrong inputs entry is a stale cache, and Turborepo trusts what you declare. The remote cache is a service to run or pay for, and cache misses on a cold repo still cost a full build.

    >

    When to reverse it: When the repo grows past the point where conventions are enforced by memory — roughly 20 packages, three teams, or a CI bill that justifies Nx Cloud — migrate to Nx and keep the Turborepo task model as the reference for what "fast" meant. When a second language becomes a first-class citizen of the repo, evaluate Bazel on one package before committing. And if the monorepo itself was the mistake — separate owners, separate release trains — no tool fixes that; split the repo and stop paying the tooling tax.

    Sources

  • Nx 24 release — task-based affected, waitFor, fine-grained e2e caching, agent-ready migrations (nx.dev)
  • Turborepo 2.11 — native Rust, Python and Go, faster startup, production pruning (turborepo.dev)
  • Turborepo 2.11.13 patch notes (GitHub)
  • Bazel release model — LTS support windows and current versions (bazel.build)
  • Why This Matters

    Understanding the business and technical context helps you make informed decisions rather than blindly following patterns.

    Trade-offs to Consider

    Every architectural decision involves trade-offs. Consider your specific requirements, team expertise, and scale when evaluating options.

    When NOT to Use This

    Knowing when a solution doesn't apply is as valuable as knowing when it does. Consider alternatives for your specific situation.

    Decision Framework

    Use this framework to evaluate whether this approach is right for your use case based on your specific constraints and requirements.

    Share this articleShare on XShare on LinkedIn

    Keep the decision frameworks coming

    One practical architecture guide a week — patterns, trade-offs, and when not to use them. No spam, unsubscribe anytime.