ScriptsApr 14, 2026·3 min read

Rolldown — Rust-Powered JavaScript Bundler and the Future of Vite

Rolldown is a Rust-based Rollup-compatible bundler built by the Vite team. It replaces esbuild + Rollup in Vite with a single fast bundler, bringing dramatic speed improvements while keeping the plugin API developers already know.

TL;DR
Rolldown is a fast Rust bundler from the Vite team that replaces esbuild + Rollup in one tool.
§01

What it is

Rolldown is a Rust-based JavaScript bundler built by the Vite team. It is designed to replace the current esbuild + Rollup dual-bundler setup in Vite with a single fast bundler. Rolldown maintains Rollup plugin compatibility while delivering the speed improvements that come from a Rust implementation.

This tool targets frontend developers using Vite who want faster builds without sacrificing the plugin ecosystem. It also benefits anyone building JavaScript libraries who needs a fast, Rollup-compatible bundler.

§02

How it saves time or tokens

Rolldown merges two bundlers into one, eliminating the behavioral differences between esbuild (used for dev) and Rollup (used for production) in Vite. Build times drop significantly because Rust parallelizes work that JavaScript bundlers handle sequentially. Fewer tool boundaries mean fewer configuration files and fewer edge-case bugs.

§03

How to use

  1. Install Rolldown via npm.
  2. Configure your build with a rolldown.config.js file or use it through Vite.
  3. Run the build command.
  4. Use existing Rollup plugins with minimal changes.
# Install Rolldown
npm install rolldown

# Build with Rolldown CLI
npx rolldown -i src/index.ts -o dist/bundle.js

# Or use with a config file
npx rolldown -c rolldown.config.js
§04

Example

A rolldown.config.js file:

import { defineConfig } from 'rolldown'

export default defineConfig({
  input: 'src/index.ts',
  output: {
    dir: 'dist',
    format: 'esm',
    sourcemap: true
  },
  resolve: {
    extensions: ['.ts', '.js', '.json']
  },
  // Rollup plugins work with Rolldown
  plugins: [
    // your existing Rollup plugins
  ]
})

The API intentionally mirrors Rollup so migration is straightforward.

§05

Related on TokRepo

§06

Common pitfalls

  • Rolldown is under active development. Some Rollup plugins may not work yet due to incomplete API coverage.
  • The Rollup plugin compatibility layer covers common APIs but not every edge case. Test your plugin stack before migrating.
  • Rolldown produces slightly different output than Rollup in some cases. Run your test suite after switching.
  • Native Rust binaries mean Rolldown has platform-specific npm packages. CI environments may need the correct platform package.
  • Vite integration is the primary use case. Standalone use outside Vite is supported but receives less testing.
  • Review the official documentation before deploying to production to ensure compatibility with your specific environment and requirements.
  • Start with default settings and customize incrementally. Changing too many configuration options at once makes debugging harder.

Frequently Asked Questions

Is Rolldown a drop-in replacement for Rollup?+

Nearly. Rolldown aims for Rollup API compatibility and supports most Rollup plugins. However, it is still in development, and some advanced plugin APIs or edge cases may behave differently. Testing is recommended before migrating.

When will Vite use Rolldown by default?+

The Vite team is working toward integrating Rolldown as the default bundler. As of early 2026, Rolldown is usable standalone and experimental Vite integration is available. Check the Rolldown GitHub for the latest status.

How much faster is Rolldown compared to Rollup?+

Speed improvements vary by project size and complexity. Rust-based bundlers typically show 5-20x improvement on large codebases due to parallelized parsing and transformation. Smaller projects see less dramatic but still noticeable gains.

Can I use Rolldown without Vite?+

Yes. Rolldown works as a standalone bundler with its own CLI and configuration file. You do not need Vite to use Rolldown. It is a general-purpose JavaScript bundler with Rollup compatibility.

Does Rolldown support TypeScript?+

Yes. Rolldown handles TypeScript natively without requiring a separate transpilation step. It strips types during bundling, similar to how esbuild handles TypeScript.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets