rolldown

Rolldown:用于打包 JavaScript 的工具,是基于 Rust 的 Rollup 替代方案与未来的 Vite 打包工具。适用于与 Rollup 兼容的配置、Vite 集成路线图、性能对比及从 Rollup 迁移的相关讨论。

仓库最近推送
GitHub Stars
219
Forks
38
Issues / PRs
7

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "rolldown":https://skillpi.com/zh/skills/deepskill-cda230fecb468e449dd443f17d6c91e43b95121b9a276eefa90f9b7b30ea3eb0。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

Rolldown:用于打包 JavaScript 的工具,是基于 Rust 的 Rollup 替代方案与未来的 Vite 打包工具。适用于与 Rollup 兼容的配置、Vite 集成路线图、性能对比及从 Rollup 迁移的相关讨论。

0 下载

介绍来源: third_party · TerminalSkills · 1.0.0 参考来源

SkillPi 解读

适合谁
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: rolldown
description: >-
  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.
license: Apache-2.0
compatibility: "Node.js 18+. Rollup-compatible API."
metadata:
  author: terminal-skills
  version: "1.0.0"
  category: devops
  tags: ["bundling", "rolldown", "rollup", "rust", "vite"]

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 — --watch for development
  • Plugin compatibility — @rollup/plugin-* packages generally work

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值75/100

亮点

  • 解决 Rollup 构建慢的核心痛点,面向前端开发者提供实用迁移方案
  • 涵盖 Vite 集成路线图,帮助用户提前适配未来生态
触发精准85/100

亮点

  • 触发词覆盖全面,包括 Rolldown、Rust Rollup、fast Rollup alternative 等关键变体
结构规范90/100

待提升项

  • description 内容重复 原报告严重程度:轻微

    顶层 frontmatter 与 skill_body 内部均包含 description,存在冗余

    改进建议:建议保留一处 description,避免重复

亮点

  • 结构清晰,包含完整的使用指南、配置示例和迁移路径
  • 提供端到端示例和明确的出口条件
执行可靠88/100

亮点

  • 工具来源明确,参数正确,覆盖主要异常场景
  • 插件兼容性说明清晰,降低用户迁移风险
证据可验 (前四项均值)85/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。