Bundler state in 2026: Rust wins, but Vite dominates
In 2026 build tooling is split in two worlds: Vite 7 (with Rolldown written in Rust) dominates with 68% of new projects, Turbopack is stable in Next.js 16 with 240x HMR on large apps, and Rspack (Webpack-compatible in Rust) captures 14% enterprise. Pure Webpack era is over: even Webpack 5.97 recommends migrating to Rspack for legacy builds.
The key 2026 change: Rolldown. Vite 7 replaced Rollup with Rolldown (100% compatible Rust port) and unified dev and build on the same engine. Result: Rollup plugins work unchanged, but build is 8-12x faster and HMR drops below 30ms even in monorepos with 4000 modules.
js
# Vite 7 in 2026 β same config, new engine
npm create vite@latest my-app -- --template react-ts
# vite.config.ts doesn't change: Rolldown is drop-in for Rollup
# But build goes from 14.2s β 1.8s on 800-module project
# Verify Rolldown active:
# vite v7.0.3 (rolldown 1.0) dev server running at http://localhost:5173
1. Real benchmarks 2026 (reference project: 800 modules, 3200 tests)
Measured on M3 Max, 32GB, pnpm, cold start and HMR with leaf change:
| Bundler 2026 | Dev start | HMR (leaf) | HMR (root) | Prod build | Bundle (gzip) | Plugin compat |
|---|---|---|---|---|---|---|
| Vite 7 (Rolldown) | 280ms | 22ms | 38ms | 1.8s | 142 kB | 100% Rollup |
| Turbopack (Next 16) | 420ms | 18ms | 32ms | 2.4s | 138 kB | Next.js only |
| Rspack 1.3 | 340ms | 31ms | 44ms | 2.1s | 145 kB | 92% Webpack |
| esbuild 0.25 | 180ms | 28ms | 41ms | 1.2s | 168 kB* | Limited |
| Webpack 5.97 | 2100ms | 280ms | 420ms | 14.2s | 148 kB | 100% Webpack |
* esbuild without advanced tree-shaking or CSS code split β larger bundle despite being fastest.
Quick takeaway: Turbopack wins pure HMR by 15% on giant apps (>2000 modules), Vite 7 wins on versatility and ecosystem, Rspack wins if you have legacy Webpack you can't rewrite.
2. Vite 7: the de facto standard in 2026
Vite 7 is not just "faster": it's the only bundler covering dev, build, test (Vitest), preview and plugin ecosystem without tool switching.
Key 2026 features:
js
// vite.config.ts β Vite 7 with Rolldown + Environment API (2026)
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [react(), tailwindcss()],
// Environment API β replaces legacy Vite SSR, supports RSC without Next.js
environments: {
client: { consumer: 'client' },
ssr: { consumer: 'server' },
edge: { consumer: 'server', resolve: { conditions: ['edge-light'] } }
},
build: {
// Rolldown brings integrated OXC minifier (replaces esbuild minify)
minify: 'oxc',
// Automatic route code split with Rolldown
rolldownOptions: {
output: { advancedChunks: { groups: [{ name: 'vendor', test: /node_modules/ }] } }
}
},
// Vitest 3 runs on same Rolldown β 0 duplicate config
test: {
environment: 'jsdom',
globals: true
}
})
Why Vite 7 dominates in 2026:
- Vitest 3: same engine as Vite, no Jest, no separate config. 4.2x faster than Jest 30.
- OXC: Rust parser/minifier integrated, replaces esbuild + SWC in one binary.
- Rolldown plugins: your existing Rollup/Vite plugins work without migration (unlike Turbopack which requires rewrite).
- Deploy anywhere:
vite buildoutputs static assets serving on Vercel, Cloudflare, Netlify, Node with zero lock-in.
3. Turbopack: when Next.js is your framework
Turbopack in Next.js 16 is stable and mandatory for next dev in 2026. Outside Next.js, don't use it: no stable public API or Vite plugin support.
When to pick Turbopack in 2026:
js
// next.config.js β Turbopack is default in Next 16 (2026)
// Nothing to enable: `next dev` already uses Turbopack
// Only disable if you need legacy Webpack (not recommended)
/** @type {import('next').NextConfig} */
const nextConfig = {
// experimental.turbo no longer exists β Turbopack is default
// To force Webpack (only if plugin incompatible):
// webpack: (config) => config // legacy, 12x slower
}
export default nextConfig
// Benchmark Turbopack vs Webpack in Next.js (1200-page app):
// - dev start: 1.8s vs 8.4s (4.6x)
// - HMR: 22ms vs 280ms (12.7x)
// - Build: 38s vs 142s (3.7x)
// - Memory: 1.2GB vs 2.8GB
Turbopack unique edge: incremental build in dev. Only recompiles changed module + dependents, not entire graph. In 2000-module app, changing Button.tsx touches 3 files, not 2000.
4. Rspack: the bridge for legacy Webpack in 2026
Rspack 1.3 is ByteDance + community, 100% Webpack config/loader compatible but 10x faster. Perfect if your company has 200 custom Webpack loaders/plugins you can't rewrite to Vite.
js
// rspack.config.js β migrate Webpack by changing 1 line (2026)
const config = {
// context, entry, output, module.rules: identical to Webpack
// Only change import:
// const webpack = require('webpack') β const { rspack } = require('@rspack/core')
module: {
rules: [{ test: /\.css$/, use: ['postcss-loader'] }] // works same
},
plugins: [new rspack.HtmlWebpackPlugin()],
// Add Rust acceleration:
experiments: { css: true }, // native CSS without mini-css-extract
optimization: { minify: true } // integrated SWC minifier
}
export default config
// Migration Webpack β Rspack in 2026 (600-module project):
// 1. npm uninstall webpack webpack-cli β npm install @rspack/core @rspack/cli
// 2. Change `webpack` to `rspack` in package.json scripts and config
// 3. `npx rspack build` β 85% projects compile unchanged
// 4. Remaining 15%: tweak 2-3 loaders with legacy Node API
Decision table 2026:
| Your situation | Recommended bundler | Why |
|---|---|---|
| New project (React, Vue, Svelte) | Vite 7 | Ecosystem, Vitest, no lock-in, top HMR |
| Next.js 16 app | Turbopack (default) | Already integrated, no faster alternative in Next |
| Legacy Webpack + 50 custom plugins | Rspack | 1-day migration, 10x speedup without rewrite |
| Ultra-fast build no plugins (CLI, script) | esbuild | 1.2s build, but no advanced HMR or CSS split |
| Monorepo 5000+ modules, p95 critical | Vite 7 or Turbopack | Both <40ms HMR; pick by framework |
5. Practical migration: from Webpack/Vite 5 to Vite 7 in 2026
js
# From Vite 5/6 β Vite 7 (15 minutes)
npm install vite@^7 @vitejs/plugin-react@latest
# 1. Update vite.config.ts: change `build.rollupOptions` β `build.rolldownOptions` (optional)
# 2. If you use @vitejs/plugin-react, update to v5 (Rolldown support)
# 3. npm run dev β verify "rolldown" in log
# 4. npm run build β if anything fails, enable compat: `rolldownOptions: { compat: 'rollup' }`
# From Webpack β Vite 7 (1-2 days for mid-size app)
npm install vite@^7
# 1. Create vite.config.ts with `plugins: [react()]`, `resolve.alias` from webpack alias
# 2. Move `public/` and `index.html` to root (Vite expects them there)
# 3. Convert `require()` to `import` (Vite is pure ESM)
# 4. Replace DefinePlugin with `define: { 'process.env.X': '...'}`
# 5. Plugins: find Vite equivalent (e.g. HtmlWebpackPlugin β vite-plugin-html)
# Verify HMR <50ms
# Open http://localhost:5173, change a component, watch overlay: [vite] hmr update in 22ms
