Rolldown
Skill ComeOnOliver/skillshub/skills/TerminalSkills/skills/rolldown
π§ The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.From the repository description
npx -y skills add ComeOnOliver/skillshub --skill rolldownAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
4.0 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it
Rolldown
Overview
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.
When to Use
- Rollup builds are slow on large projects
- Want to prepare for Vite's future bundler
- Building libraries where Rollup-compatible output matters
- Need faster bundling than Rollup without switching to webpack/esbuild
- Following the OXC ecosystem (oxlint β Rolldown β OXC resolver)
Instructions
Setup
npm install -D rolldown
Basic Configuration
// 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,
},
});
Library Build
// 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,
},
],
});
With Plugins
// 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 Commands
# Build
npx rolldown -c
# Build with specific config
npx rolldown -c rolldown.config.js
# Watch mode
npx rolldown -c --watch
Migration from Rollup
// 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
Examples
Example 1: Migrate a Rollup library build
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.
Example 2: Prepare a Vite project for Rolldown
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.
Guidelines
- Rollup-compatible config β same format, most plugins work
- TypeScript built-in β no separate TypeScript plugin needed
- Still in development β API may change; check compatibility for production use
- Vite integration coming β Rolldown will replace Rollup in Vite's production builds
- OXC ecosystem β part of the Rust JS toolchain (oxlint, oxc-resolver, Rolldown)
- 10-100x faster than Rollup β Rust parallelism over JavaScript
- Tree shaking built-in β same quality as Rollup
- ESM-first β designed for modern JavaScript output
- Watch mode supported β
--watchfor development - Plugin compatibility β @rollup/plugin-* packages generally work
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.