tsdown

仓库创建 2026年1月28日最近提交 1 个月前SkillHot 收录 22 天前
▸ 精选理由

对库作者友好,构建速度快且输出多样,便于替代常见打包器。

▸ 风险提示

构建阶段要求 Node.js 22.18.0 或更高版本。

这个 Skill 做什么

面向库打包的高性能工具,基于 Rolldown 提供多格式输出与声明文件生成。

面向库开发,能把 TypeScript/JavaScript 打包成多种格式并生成声明文件(.d.ts),打包速度很快,背后用的是 Rolldown 和 Oxc。适合发布类库、迁移自 tsup 或需要同时输出 ESM/CJS 等格式的场景。特别在于构建时要求 Node.js 22.18.0+,但产物可以兼容更低版本的运行时。

▸ 展开 SKILL.md 英文原文

Bundle TypeScript and JavaScript libraries with blazing-fast speed powered by Rolldown. Use when building libraries, generating type declarations, bundling for multiple formats, or migrating from tsup.

开发编程打包TypeScript库构建通用
5.7k
Stars
313
Forks
19
仓库内 Skill
+188
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/antfu/skills/main/skills/tsdown/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/antfu/skills/main/skills/tsdown/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# tsdown - The Elegant Library Bundler

Blazing-fast bundler for TypeScript/JavaScript libraries powered by Rolldown and Oxc.

## Runtime Requirement

`tsdown` requires **Node.js 22.18.0 or higher to run** (build-time only). However, the bundled output can target much lower Node.js versions via the [`target`](references/option-target.md) option, so libraries built with tsdown are **not locked to Node.js 22+ at runtime**.

If your package needs to support Node.js 18 / 20:

- **Build with Node.js 22+ in CI** (e.g. set `target: 'node18'` or `target: 'node20'`).
- **Test the built output (or the packed tarball) on the lower Node.js versions** you intend to support — e.g. using a matrix job that 
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有