$npx skillfedfor your agent

tsdown

tsdown handles the complexities of preparing TypeScript and JavaScript packages for npm distribution across multiple module formats. It automates bundling, format generation, and output optimization so you can focus on writing code rather than build configuration.

tsdown is a TypeScript library bundler designed to simplify npm package distribution. tsdown handles the complexities of preparing TypeScript and JavaScript packages for npm distribution across multiple module formats. It automates bundling, format generation, and output optimization so you can focus on writing code rather than build configuration. The tool is released under the MIT license and supports generating type declaration files while optimizing bundle size.

AI-generated summary based on this skill's SKILL.md

951 109 MITupdated by sanity-io

Decision gist · record as of 2026-07-27

tsdown is a TypeScript library bundler designed to simplify npm package distribution. tsdown handles the complexities of preparing TypeScript and JavaScript packages for npm distribution across multiple module formats. It automates bundling, format generation, and output optimization so you can focus on writing code rather than build configuration. The tool is released under the MIT license and supports generating type declaration files while optimizing bundle size.

manual: git clone https://github.com/sanity-io/next-sanity → cp -r next-sanity/.agents/skills/tsdown ~/.claude/skills/tsdown
.agents/skills/tsdown/SKILL.md · version ff3771ff

Use it when

  • Yes, tsdown excels at this core function.
  • tsdown is positioned as a faster alternative to tsup with minimal configuration changes required.

Verify before relying

Read SKILL.md below before installing (42 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

sanity-io/next-sanity/tsdown · repository language: TypeScript

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is tsdown and what does it do for TypeScript library bundling?

tsdown is a TypeScript library bundler designed to simplify npm package distribution. tsdown handles the complexities of preparing TypeScript and JavaScript packages for npm distribution across multiple module formats. It automates bundling, format generation, and output optimization so you can focus on writing code rather than build configuration. The tool is released under the MIT license and supports generating type declaration files while optimizing bundle size.

Can tsdown bundle TypeScript declarations and generate multiple output formats?

Yes, tsdown excels at this core function. tsdown generates type declaration files and optimizes bundle size as a primary capability. It bundles TypeScript and JavaScript libraries for npm with multiple output formats, allowing you to produce ESM, CJS, and other module formats from a single configuration. This eliminates the need to manually manage separate build pipelines for different output targets.

How does tsdown compare to tsup, and can I migrate from tsup to tsdown?

tsdown is positioned as a faster alternative to tsup with minimal configuration changes required. One of tsdown's key strengths is enabling migration from tsup to a faster bundler while maintaining compatibility with your existing setup. If you're currently using tsup and looking for improved build performance, tsdown offers a streamlined path forward without requiring a complete rebuild of your configuration.

Does tsdown support building component libraries for React, Vue, Solid, or Svelte?

Yes, tsdown supports building React, Vue, Solid, or Svelte component libraries as a dedicated use case. This makes tsdown suitable for teams developing framework-specific component packages that need to be distributed across multiple module formats while maintaining proper type definitions and optimized bundle sizes.

Can tsdown be used for workspace and monorepo builds with CI-aware settings?

tsdown includes support for configuring workspace and monorepo builds with CI-aware settings. This capability allows you to manage multiple interdependent packages within a single repository while automatically adapting build behavior based on your continuous integration environment, making it well-suited for complex project structures.

What features does tsdown provide for optimizing and monitoring TypeScript bundle output?

tsdown provides comprehensive optimization features including minification, tree shaking, and source map generation for TypeScript bundles. The bundler focuses on reducing output size while maintaining code quality and debuggability. Additionally, tsdown offers watch mode for development workflows, allowing you to iterate quickly while building libraries with proper type declarations and multiple output formats.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

tsdown - The Elegant Library Bundler

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

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 |

(truncated - see the full file via the links below)

File tree — 15 files
.agents/skills/tsdown/LICENSE.md
.agents/skills/tsdown/README.md
.agents/skills/tsdown/SKILL.md
.agents/skills/tsdown/SYNC.md
.agents/skills/tsdown/references/README.md
.agents/skills/tsdown/references/advanced-benchmark.md
.agents/skills/tsdown/references/advanced-ci.md
.agents/skills/tsdown/references/advanced-hooks.md
.agents/skills/tsdown/references/advanced-plugins.md
.agents/skills/tsdown/references/advanced-programmatic.md
.agents/skills/tsdown/references/advanced-rolldown-options.md
.agents/skills/tsdown/references/guide-getting-started.md
.agents/skills/tsdown/references/guide-introduction.md
.agents/skills/tsdown/references/guide-migrate-from-tsup.md
.agents/skills/tsdown/references/option-cjs-default.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Bundle TypeScript/JavaScript libraries for npm with multiple output formats”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

Ts Sdk Author
by mindfold-ai · mindfold-ai/Trellis

Ts Sdk Author provides a robust framework for building and organizing TypeScript SDKs from the ground up. This agent harness accelerates SDK scaffolding, letting you focus on implementation details rather than boilerplate setup. Ideal for developers who need production-ready TypeScript SDK foundations quickly.

AGPL-3.0updated Jul 2026
★ 13,222repo stars
tsdown
by rolldown · rolldown/tsdown

tsdown is a modern bundler built on Rolldown that streamlines packaging TypeScript and JavaScript libraries for distribution. It combines fast build performance with automatic declaration file generation, making it ideal for developers preparing libraries for npm publication.

MITupdated Jul 2026
★ 4,183repo stars
tsdown
by hairyf · hairyf/skills

tsdown is a bundling tool designed to package TypeScript and JavaScript libraries for npm distribution with support for multiple output formats. It simplifies the build process by offering flexible configuration options tailored to modern web development workflows.

MITupdated Jun 2026
★ 24repo stars
tsdown
by antfu · antfu/skills

tsdown packages your TypeScript and JavaScript code for npm distribution while preserving complete type information. This skill automates the bundling process, ensuring your libraries ship with accurate type declarations for better developer experience and IDE support.

MITupdated Jun 2026
★ 5,665repo stars
Tsdown
by oakoss · oakoss/agent-skills

Tsdown streamlines the process of acquiring TypeScript files on demand, giving developers a straightforward way to handle remote file retrieval in their workflows. Whether you're building automation scripts or managing dependencies, this tool integrates seamlessly into your development pipeline.

no license declared → metadata onlyupdated Mar 2026
★ 13repo stars
tsdown-migrate
by rolldown · rolldown/tsdown

This skill guides you through converting an existing tsup-based build setup to tsdown, Rolldown's elegant library bundler. It provides comprehensive option mappings and automated config transformation to ensure your project transitions smoothly while maintaining build performance and output quality.

MITupdated Jul 2026
★ 4,183repo stars

More skills Ts Library (unlicensed) · arch-tsdown (MIT) · Tanstack Cli (unlicensed) · monorepo-management (MIT) · turborepo (MIT)

Tags
rolldown-poweredoxc-compilermulti-format-outputdeclaration-generationtree-shake-enablednpm-library-toolframework-agnosticmonorepo-supportdev-dependency