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.
Installation agent prête
Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.
npx -y tokrepo@latest install dca2d215-37be-11f1-9bc6-00163e2b0d79 --target codexÀ exécuter après confirmation du plan en dry-run.
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.
Questions fréquentes
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.
Sources citées (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
En lien sur TokRepo
Fil de discussion
Actifs similaires
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.
Makepad — Creative Software Development Platform for Rust
Makepad is a Rust-based UI framework and live-coding IDE that compiles to WebGL, Metal, DirectX, and OpenGL. It combines a visual design environment with a high-performance rendering engine for building desktop, mobile, and web applications.
Valtio — Proxy-Based State Management for React
Valtio makes React state management simple by wrapping plain JavaScript objects in a proxy, so components automatically re-render when the properties they read change — no reducers, actions, or boilerplate required.
Gatsby — React-Based Framework for Performant Static Sites
Gatsby is a React-based open-source framework for building fast, secure websites and apps. It combines static site generation with dynamic capabilities, pulling data from any source via GraphQL.