Next.js dev server with webpack: 10 seconds to start. With Turbopack: under 1 second. Same codebase, same config.
What is Turbopack?
Turbopack is a Rust-based bundler designed by the Vercel team as webpack's successor. It's now the default dev bundler in Next.js 15 and handles HMR updates in milliseconds regardless of application size.
Why Turbopack
1. Enable in Next.js (One Flag)
next dev --turbopack
That's it. Your existing Next.js app works with Turbopack. No config changes.
2. Incremental Computation
Turbopack only recomputes what changed:
Change a CSS file:
Webpack: reprocesses CSS → checks dependencies → updates bundle (500ms)
Turbopack: updates only the changed CSS module (5ms)
Change a React component:
Webpack: traverses module graph → rebundles (1-3s)
Turbopack: updates only affected component (10ms)
3. Performance at Scale
| App Size | Webpack Cold Start | Turbopack Cold Start |
|---|---|---|
| Small (100 modules) | 2s | 0.5s |
| Medium (1K modules) | 8s | 1.2s |
| Large (10K modules) | 30s+ | 2.5s |
| Enterprise (50K+) | 120s+ | 5s |
HMR is consistently fast regardless of app size — updates in <50ms even for 50K+ module apps.
4. Compatible With Next.js Features
Supported:
✅ App Router
✅ Pages Router
✅ Server Components
✅ Server Actions
✅ CSS Modules
✅ Tailwind CSS
✅ sass/less
✅ TypeScript
✅ JSX/TSX
✅ next/image
✅ next/font
✅ Middleware
5. Function-Level Caching
Traditional bundlers cache at the file level.
Turbopack caches at the function level.
File A changed → only functions that depend on A's exports recompute.
Even within the same file, unchanged functions are cached.
Turbopack vs Webpack vs Vite
| Turbopack | Webpack 5 | Vite | |
|---|---|---|---|
| Language | Rust | JavaScript | JS + esbuild (Go) |
| Cold start | ~1s | ~10s | ~2s |
| HMR | <50ms | 500ms-3s | 50-200ms |
| Scales with size | Yes (incremental) | No (slows down) | Partially |
| Next.js integration | Native | Native | Via community |
| Production build | Coming soon | Yes | Yes |
How to Use
// next.config.js — it's enabled by default in Next.js 15
/** @type {import('next').NextConfig} */
const nextConfig = {
// Turbopack is the default dev bundler
// No configuration needed
};
module.exports = nextConfig;
# Dev (uses Turbopack by default)
next dev
# If you need webpack for specific plugins
next dev --webpack
The Bottom Line
Turbopack makes Next.js dev feel instant. Sub-second cold starts, <50ms HMR, and it works with your existing codebase. The future of JavaScript bundling is incremental, function-level computation in Rust.
Need data tools? I build scraping solutions. Check my Apify actors or email spinov001@gmail.com.
Top comments (0)