Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

tsdown

БесплатноБез исполняемых скриптовНе проверен

Bundle TypeScript and JavaScript libraries with blazing-fast speed powered by Rolldown. Use when building libraries, generating type declarations, bundling…

rolldownот rolldown★ 4 355 звёзд на GitHub

Об этом скилле

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 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 runs the published package's tests on Node.js 18 / 20 / 22.

When to Use

  • Building TypeScript/JavaScript libraries for npm
  • Generating TypeScript declaration files (.d.ts)
  • Bundling for multiple formats (ESM, CJS, IIFE, UMD)
  • Optimizing bundles with tree shaking and minification
  • Migrating from tsup with minimal changes
  • Building React, Vue, Solid, or Svelte component libraries

Quick Start

# Install
pnpm add -D tsdown

# Basic usage
npx tsdown

# With config file
npx tsdown --config tsdown.config.ts

# Watch mode
npx tsdown --watch

# Migrate from tsup
npx tsdown-migrate

Basic Configuration

import { defineConfig } from 'tsdown'

export default defineConfig({
  entry: ['./src/index.ts'],
  format: ['esm', 'cjs'],
  dts: true,
  clean: true,
})

Core References

Topic Description Reference
Getting Started Installation, first bundle, CLI basics guide-getting-started
Configuration File Config file formats, multiple configs, workspace option-config-file
CLI Reference All CLI commands and options reference-cli
Migrate from tsup Migration guide and compatibility notes guide-migrate-from-tsup
Plugins Rolldown, Rollup, Unplugin support advanced-plugins
Hooks Lifecycle hooks for custom logic advanced-hooks
Programmatic API Build from Node.js scripts, in-memory builds (write: false) advanced-programmatic
Rolldown Options Pass options directly to Rolldown advanced-rolldown-options
CI Environment CI detection, 'ci-only' / 'local-only' values advanced-ci

For comprehensive migration assistance with complete option mappings, install the dedicated tsdown-migrate skill: npx skills add rolldown/tsdown --skill tsdown-migrate

Build Options

Option Usage Reference
Entry points entry: ['src/*.ts', '!**/*.test.ts'] option-entry
Output formats format: ['esm', 'cjs', 'iife', 'umd'] option-output-format
Output directory outDir: 'dist', outExtensions option-output-directory
Type declarations dts: true, dts: { sourcemap, compilerOptions, vue } option-dts
Target environment target: 'es2020', target: 'esnext' option-target
Platform platform: 'node', platform: 'browser' option-platform
Tree shaking treeshake: true, custom options option-tree-shaking
Minification minify: true, minify: 'dce-only' option-minification
Source maps sourcemap: true, 'inline', 'hidden' option-sourcemap
Watch mode watch: true, watch options option-watch-mode
Cleaning clean: true, clean patterns option-cleaning
Log level logLevel: 'silent', failOnWarn: false, suppressWarnings: [...] option-log-level

Dependency Handling

Feature Usage Reference
Never bundle deps: { neverBundle: ['react', /^@myorg\//] } option-dependencies
Always bundle deps: { alwaysBundle: ['dep-to-bundle'] } option-dependencies
Only bundle deps: { onlyBundle: ['cac', 'bumpp'] } - Whitelist option-dependencies
Only import deps: { onlyImport: ['cac'] } - Whitelist runtime imports in output option-dependencies
Externalize all deps: { neverBundle: true } [option-dependencies](refer
Полный SKILL.md на GitHub

Установить tsdown в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdreferences/README.mdreferences/advanced-benchmark.mdreferences/advanced-ci.mdreferences/advanced-hooks.mdreferences/advanced-plugins.mdreferences/advanced-programmatic.mdreferences/advanced-rolldown-options.mdreferences/guide-getting-started.mdreferences/guide-introduction.mdreferences/guide-migrate-from-tsup.mdreferences/option-cjs-default.mdreferences/option-cleaning.mdreferences/option-config-file.mdreferences/option-copy.mdreferences/option-css.mdreferences/option-dependencies.mdreferences/option-dts.mdreferences/option-entry.mdreferences/option-exe.mdreferences/option-lint.mdreferences/option-log-level.mdreferences/option-minification.mdreferences/option-output-directory.mdreferences/option-output-format.mdreferences/option-package-exports.mdreferences/option-platform.mdreferences/option-root.mdreferences/option-shims.mdreferences/option-sourcemap.mdreferences/option-target.mdreferences/option-tree-shaking.mdreferences/option-unbundle.mdreferences/option-watch-mode.mdreferences/recipe-react.mdreferences/recipe-solid.mdreferences/recipe-svelte.mdreferences/recipe-vue.mdreferences/recipe-wasm.mdreferences/reference-cli.md

FAQ

Что делает скилл tsdown?

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.

Как установить скилл tsdown?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл tsdown запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить tsdown с