Bundle JavaScript with Rolldown — Rust-based Rollup replacement, future Vite bundler. Use when someone asks to "Rolldown", "Rust Rollup", "fast Rollup alternative", "future Vite bundler", "Rolldown bundler", or "OXC bundler". Covers Rollup-compatible config, Vite integration roadmap, performance comparison, and migration from Rollup.
Rolldown is a Rust-based JavaScript bundler designed to replace Rollup — and eventually become Vite's production bundler. Built on OXC (the Rust toolchain behind oxlint), it aims for full Rollup API compatibility with 10-100x better performance. Currently in active development; when stable, Vite will use Rolldown instead of Rollup for production builds, unifying dev and prod bundling.
npm install -D rolldown
// rolldown.config.js — Rollup-compatible config format
import { defineConfig } from "rolldown";
export default defineConfig({
input: "src/index.ts",
output: {
dir: "dist",
format: "esm",
sourcemap: true,
},
});
// rolldown.config.js — Build a library with multiple outputs
import { defineConfig } from "rolldown";
export default defineConfig({
input: "src/index.ts",
external: ["react", "react-dom"], // Don't bundle peer deps
output: [
{
dir: "dist",
format: "esm",
entryFileNames: "[name].js",
sourcemap: true,
},
{
dir: "dist",
format: "cjs",
entryFileNames: "[name].cjs",
sourcemap: true,
},
],
});
// rolldown.config.js — Using Rollup-compatible plugins
import { defineConfig } from "rolldown";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
export default defineConfig({
input: "src/index.ts",
plugins: [
resolve(), // Resolve node_modules
commonjs(), // Convert CommonJS to ESM
],
output: {
dir: "dist",
format: "esm",
},
});
# Build
npx rolldown -c
# Build with specific config
npx rolldown -c rolldown.config.js
# Watch mode
npx rolldown -c --watch
// package.json — Swap the dependency
- "rollup": "^4.0.0"
+ "rolldown": "^1.0.0"
// Config is compatible — rename if needed
// rollup.config.js → rolldown.config.js (optional)
// Most Rollup configs work unchanged. Key differences:
// ✅ TypeScript built-in — no @rollup/plugin-typescript needed
// ✅ Node resolve built-in — @rollup/plugin-node-resolve often unnecessary
// ✅ Most Rollup plugins compatible — plugin API is the same
// ⚠️ Some advanced plugin hooks may differ — check docs
User prompt: "My library uses Rollup and builds are slow. Migrate to Rolldown."
The agent will swap rollup for rolldown, remove unnecessary plugins (TypeScript and node-resolve are built-in), and benchmark the improvement.
User prompt: "I want to be ready when Vite switches to Rolldown. What should I do?"
The agent will audit the current Vite config for Rollup-specific plugin usage, identify potential compatibility issues, and suggest config changes.
--watch for developmentnpx skills add TerminalSkills/rolldown下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer