← All articles
black laptop computer naer plant on brown wooden surface

Rolldown: The Rust-Based Bundler Unifying Rollup and esbuild

Build Tools 2026-03-30 · 4 min read rolldown bundler rust vite javascript
By DevTools Guide Editorial TeamSoftware engineers and developer advocates covering tools, workflows, and productivity for modern development teams.

JavaScript bundling has fragmented into multiple tools with different strengths. Rollup produces clean output but is slow. esbuild is blazing fast but limited in plugin compatibility. Vite uses both — Rollup for production, esbuild for development — creating subtle inconsistencies between environments.

Photo by Joshua Aragon on Unsplash

Rolldown aims to fix this by building a single bundler that's Rollup-compatible and esbuild-fast, written in Rust.

What Rolldown Actually Is

Rolldown is an open-source JavaScript/TypeScript bundler built in Rust by the Vite team. The project has a specific goal: replace both Rollup and esbuild inside Vite with a single unified bundler. This eliminates the dev/prod behavioral split that has been a persistent source of bugs in Vite projects.

The key design decisions:

Performance

Rolldown's Rust core gives it significant speed advantages over JavaScript-based bundlers. In benchmarks against real-world projects, it typically bundles 10-30x faster than Rollup while producing comparable output. Against esbuild, it's competitive on raw speed but produces better tree-shaken output.

The speed difference matters most in CI/CD pipelines and large monorepos where production builds take minutes. A project that takes 45 seconds with Rollup might finish in 2-3 seconds with Rolldown.

Getting Started

Install Rolldown and create a basic configuration:

npm install rolldown --save-dev

Create rolldown.config.js:

import { defineConfig } from 'rolldown'

export default defineConfig({
  input: 'src/index.ts',
  output: {
    dir: 'dist',
    format: 'esm',
  },
})

Run the build:

npx rolldown -c rolldown.config.js

If you're migrating from Rollup, the configuration format is intentionally similar. Most Rollup configs work with minor adjustments — primarily around plugins that rely on Rollup internals rather than the documented plugin API.

Like what you're reading? Subscribe to DevTools Guide — free weekly guides in your inbox.

Plugin Compatibility

Rolldown implements the Rollup plugin interface, which means plugins using standard hooks (resolveId, load, transform, renderChunk) work out of the box. This covers the majority of the Rollup plugin ecosystem.

import { defineConfig } from 'rolldown'
import commonjs from '@rollup/plugin-commonjs'

export default defineConfig({
  input: 'src/index.ts',
  plugins: [commonjs()],
  output: {
    dir: 'dist',
    format: 'esm',
  },
})

Plugins that use undocumented Rollup internals or rely on specific bundling order may need updates. The Rolldown team maintains a compatibility tracker for popular plugins.

Built-in TypeScript and JSX

Unlike Rollup, which requires @rollup/plugin-typescript or @rollup/plugin-babel for TypeScript support, Rolldown handles TypeScript and JSX natively:

export default defineConfig({
  input: 'src/index.tsx',
  output: {
    dir: 'dist',
    format: 'esm',
  },
  // TypeScript and JSX work without any plugins
})

This isn't just convenient — it's faster. Native transforms avoid the JavaScript↔Rust serialization overhead that plugin-based approaches incur. For projects with hundreds of TypeScript files, this alone can cut build times significantly.

How It Fits with Vite

Rolldown's primary integration target is Vite. The Vite team is working toward using Rolldown as the single bundler for both development and production builds. This means:

For Vite users, this transition will mostly be invisible — Vite's configuration API stays the same, and existing plugins continue working through the Rollup-compatible interface.

When to Use Rolldown

Good fit:

Not the best fit (yet):

Rolldown vs Rspack vs Turbopack

The Rust-based bundler space now has several contenders:

These tools solve different migration paths rather than competing directly. Pick based on your current toolchain, not raw benchmarks.

Practical Migration Tips

If you're moving from Rollup to Rolldown:

  1. Start with the config — copy your rollup.config.js and rename it. Most options map directly.
  2. Test plugins one at a time — remove all plugins, verify the base build works, then add plugins back individually.
  3. Check output — compare the bundled output between Rollup and Rolldown. Tree shaking differences may surface edge cases in your code.
  4. Update CI — Rolldown's speed improvement means you can tighten CI timeout thresholds and potentially remove caching layers that existed only to work around slow builds.

What to Watch

Rolldown is under active development with frequent releases. The project is approaching production stability, but breaking changes still happen between minor versions. Pin your version in package.json and test upgrades explicitly rather than using loose version ranges.

The Vite integration is the milestone that will push Rolldown into mainstream adoption. When Vite ships with Rolldown as the default bundler, millions of projects will be using it whether they know it or not. Getting familiar with it now means fewer surprises when that transition happens.

Get free weekly tips in your inbox. Subscribe to DevTools Guide