Vite 8 and Rolldown: One Bundler for Dev and Build
Vite used esbuild in development and Rollup for production, and they didn't always agree. Vite 8 replaces both with Rolldown. What I changed to upgrade, and the plugin I had to drop.
Vite 8 went stable on March 12. The headline is that Vite now has one bundler instead of two. I upgraded two Vite projects, a React admin panel and a small marketing site, in the two weeks since.
The problem it fixes
Until now, Vite ran two different tools depending on the command:
esbuild was fast for development. Rollup produced better production bundles. But they're different programs with different edge cases, so once in a while something worked in vite dev and broke in vite build. A CommonJS dependency imported one way in dev and another in the bundle. Those bugs only showed up in CI or, worse, after deploy.
Rolldown is a Rust bundler built to be Rollup-compatible, on top of the Oxc parser. Vite 8 uses it for both commands. One tool, one set of edge cases.
The upgrade
For the admin panel, it was a version bump and one config rename:
export default defineConfig({
plugins: [react()],
build: {
// was: rollupOptions
rolldownOptions: {
output: { manualChunks: undefined },
},
},
});build.rollupOptions still works as a deprecated alias, so nothing broke on day one. I renamed it anyway to get it out of the way.
The marketing site needed more work. It used a Rollup plugin for inlining small SVGs that relied on a Rollup-only hook. Rolldown runs most Rollup plugins as-is, but not every hook. I replaced it with Vite's built-in ?raw import and deleted a dependency.
What changed in practice
- Production builds are much faster. The admin panel's build went from long enough to check my phone to done before I looked away. I didn't benchmark carefully; the difference was obvious enough not to need it.
- Dev and prod finally agree. The class of "works locally, broken in the bundle" bugs is gone, or at least it now shows up locally too.
- One set of options. Build, dependency pre-bundling, and dev all configure the same bundler, so there's one place to look when something resolves strangely.
What to check before you upgrade
- List your plugins. Most work. Ones that use rare Rollup hooks or reach into esbuild options need a look. Search the plugin's issue tracker for "Rolldown" first.
- Look for
optimizeDeps.esbuildOptions. Dependency pre-bundling uses Rolldown now, so esbuild-specific options there need translating. - Run the production build locally before CI does. That's always good advice. With Vite 8 it's where you'll see the plugin gaps.
Rolldown itself was still a release candidate when Vite 8 shipped, which made me hesitate for about a day. The Vite team had been running it in production through the beta, and my upgrade went smoothly. For a new project, I'd start on 8 without a second thought.
Keep reading
All posts2026
3 min
Oxlint and Oxfmt Next to Biome, and Which One I Kept
Oxfmt hit beta in February and Oxlint keeps growing. Both are Rust, both are fast. A side-by-side on a real project, and why I kept Biome on most repos but not all of them.
rusttooling3 min
Six Months of Turbopack as the Default Bundler
Next.js 16 switched both dev and build to Turbopack. What got faster, the webpack config I had to translate, and the one escape hatch worth knowing before you need it.
rustnextjstooling