Skip to the page

Build, deploy and upgrade · mid

Turbopack and the build pipeline

Turbopack is the default bundler for next dev and next build since Next.js 16; custom webpack() config is ignored unless you opt out with --webpack, and later 16.x releases added disk caching, a bundle analyzer and smaller output.

The notes

What you must know

  • Next 16: Turbopack stable and default for dev and build (2-5x faster builds, up to 10x faster Fast Refresh). Opt out with next dev --webpack / next build --webpack.
  • A custom webpack() function in next.config is ignored by Turbopack; port aliases and loaders to the top-level turbopack config (it moved out of experimental in 16).
  • If a Babel config is found, Turbopack enables Babel automatically (Next 16).
  • Disk cache: dev file system caching since 16.1; 16.3 enabled it for next build by default and added memory eviction (much less dev RAM).
  • Bundle analysis: Turbopack Bundle Analyzer (16.1+); 16.4 added a route summary, table view, snapshots/diffs and critical-path filtering.
  • 16.4 output: shared runtime chunk, shorter CSS Module class names, export mangling; lazy server HMR.
  • React Compiler: reactCompiler: true (stable in 16, Babel-based); experimental Rust compiler inside Turbopack via experimental.turbopackRustReactCompiler (16.3+).
  • next lint was removed in 16; run ESLint (flat config) or Biome directly.

The red pen

Common traps: mistake → fix

  • Mistake: "My webpack loaders still run after upgrading"

    Fix: not under Turbopack; port them or use --webpack short term.

  • Mistake: "Turbopack is dev-only"

    Fix: it is the default for production builds since 16.

  • Mistake: "next build still lints"

    Fix: it no longer runs linting.

Easy to hard

Questions interviewers ask, easy to hard

  1. After upgrading to 16 the build ignores our custom webpack() function. Why, and what do you do?
  2. How do you find what makes a route's bundle big?
  3. What did 16.3 and 16.4 change for build speed and output?
  4. How do you enable the React Compiler in Next.js?

Explain it out loud

Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.

Practise by voice

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview