talira

Library bundler for TypeScript and JavaScript, built on Rolldown

open sourceMITfree

tsdown is a bundler for TypeScript and JavaScript libraries, built on top of Rolldown and Oxc. It builds bundles and declaration files with sensible defaults for library authors, supports Rollup, Rolldown and unplugin plugins and some Vite plugins, and is compatible with tsup's main options, with a migration guide from tsup. It's a VoidZero project.

Problems it solves

  • bundle my TypeScript library for npm with type declarations
  • a faster replacement for tsup that keeps my config
  • build an npm package in ESM and CJS without configuring Rollup myself

Features

  • Bundles TypeScript and JavaScript libraries and generates declaration files
  • Built on Rolldown and Oxc
  • Supports Rollup, Rolldown and unplugin plugins, and some Vite plugins
  • Compatible with tsup's main options, with a migration guide

Alternatives

The same job

These do what tsdown does.

  1. tsup Zero-config bundler for TypeScript libraries, powered by esbuild
  2. rollup-plugin-dts Bundle TypeScript .d.ts declaration files with Rollup
  3. TSDX Zero-config CLI for developing, testing and publishing TypeScript packages
  4. unplugin-dts Generate .d.ts declaration files from TypeScript or Vue sources in your bundler
  5. Rollup ES module bundler for JavaScript libraries and apps, with tree shaking
  6. rollup-plugin-typescript2 Rollup plugin that compiles TypeScript and reports its type errors

Compare tsdown with the top 3