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.
Ready-to-run agent install
This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.
npx -y tokrepo@latest install dca2d215-37be-11f1-9bc6-00163e2b0d79 --target codexRun after dry-run confirms the install plan.
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.
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.
How to use
- Install Rolldown via npm.
- Configure your build with a
rolldown.config.jsfile or use it through Vite. - Run the build command.
- 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
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.
Related on TokRepo
- Automation tools — Build and bundling automation
- AI coding tools — Frontend development tools
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
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.
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.
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.
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.
Yes. Rolldown handles TypeScript natively without requiring a separate transpilation step. It strips types during bundling, similar to how esbuild handles TypeScript.
Citations (3)
- Rolldown GitHub— Rolldown is a Rust-based Rollup-compatible bundler by the Vite team
- Vite Documentation— Vite's bundler architecture and future plans
- Rollup Documentation— Rollup plugin API specification
Related on TokRepo
Discussion
Related Assets
Turbopack — Rust-Powered Incremental Bundler for JavaScript and TypeScript
Turbopack is a Rust-based incremental bundler for JavaScript and TypeScript projects, designed as the successor to Webpack. It is integrated into Next.js for development builds.
Farm — Extremely Fast Vite-Compatible Web Build Tool in Rust
A Rust-based web build tool that is fully compatible with the Vite plugin ecosystem while delivering significantly faster build and HMR performance.
Oxc — The JavaScript Oxidation Compiler Written in Rust
Oxc is a Rust-based collection of JavaScript tools — parser, linter, resolver, transformer, and minifier — designed to be the fastest in each category. It underpins next-generation web tools like Rolldown and provides drop-in replacements for ESLint, Babel, and terser.
Vitest — Next Generation Testing Framework Powered by Vite
Vitest is a blazing-fast unit testing framework powered by Vite, with native ESM, TypeScript, and JSX support. Jest-compatible API, instant HMR for tests, and in-source testing make it the go-to test runner for Vite projects.