Skip to content

Turbopack

Коротко:

Turbopack — JS bundler на Rust от Vercel (2022+), преемник Webpack. Incremental compilation с function-level cache → dev server cold start 3-5x быстрее Webpack, HMR <100ms вместо 2s. Stable в Next.js 15 (2024). Competitor: Vite (esbuild + Rollup), Bun bundler. Не general-purpose — Next.js-specific.

Ниже: подробности, пример, смежные термины, FAQ.

Попробовать бесплатно →

Подробности

  • Language: Rust (через napi-rs для Node integration)
  • Architecture: Turbo engine — incremental computation framework
  • Caching: function-level (каждая трансформация cached)
  • Next.js 15 stable для dev. Production build — всё ещё Webpack (2025-2026)
  • Benchmarks (Next.js): 3-5x быстрее dev start, 10x быстрее HMR

Пример

# Use Turbopack в Next.js dev
$ next dev --turbo

# Or в package.json
"scripts": {
  "dev": "next dev --turbo"
}

# Production build (Webpack сейчас)
$ next build

Смежные термины

Больше по теме

Часто задаваемые вопросы

Turbopack vs Vite?

Turbopack: Rust, tightly coupled с Next.js. Vite: esbuild (Go) + Rollup, universal (React, Vue, Svelte). Для не-Next проектов — Vite.

Production ready?

Dev mode — stable в Next.js 15. Production build — alpha (2026). Ждите v16 для full production.

Migration из Webpack?

В Next.js — просто флаг --turbo. Для custom Webpack config — не все loaders supported; проверьте compatibility.