Question presented to candidate: "What is Turbopack, is it production ready, and what should a team with a custom Webpack configuration check before relying on it?"
What a strong answer should cover:
- Turbopack is an incremental bundler written in Rust, built into Next.js; since Next.js 16 it is the default for both
next devandnext build. - Its speed comes from incremental computation and caching at the function level, so changes recompute only what depends on them.
- Webpack is still available with
--webpack. - A custom
webpack()function in next.config is never called by Turbopack, and a plainnext buildthat finds one with noturbopackkey stops with an error rather than ignoring it: common needs have built-in support orturbopack.rulesfor Webpack loaders; Webpack plugins are not supported. - Configure it under the
turbopackkey (for examplerules,resolveAlias,root); file-system caching, on by default for dev since 16.1 and for builds since 16.3, speeds up restarts.
Clarifying questions expected:
- "Does next.config have a webpack function or plugins?" β those need a migration or
--webpack. - "Which loaders are used?" β many work through turbopack.rules.
Code / implementation expected: Yes β moving a loader to turbopack.rules, and the opt-out flag.