Zero-config CLI for developing, testing and publishing TypeScript packages
open sourceMITfree
TSDX is a zero-config command-line tool for building TypeScript libraries: it scaffolds a package from a basic or React template, then builds dual ESM and CommonJS output with type declarations, runs tests, lints and formats, all with sensible defaults. Version 2.0 is a rewrite on Rust-based tooling: it builds with bunchee, tests with Vitest and lints and formats with oxlint and oxfmt, and it uses Bun for package management.
Problems it solves
- publish a TypeScript library to npm without configuring bundlers
- build dual ESM and CommonJS output for my npm package
- start a React component library with tests and builds set up
Features
- scaffolds a package from a basic or React template
- dual ESM and CommonJS builds with proper exports
- type declaration generation
- tests with Vitest, lint and format with oxlint and oxfmt
- zero config with sensible defaults
Limitations
- Needs Node.js 20 or newer and uses Bun for package management.1
Alternatives
The same job
These do what TSDX does.
- tsup Zero-config bundler for TypeScript libraries, powered by esbuild
- tsdown Library bundler for TypeScript and JavaScript, built on Rolldown
- Rollup ES module bundler for JavaScript libraries and apps, with tree shaking
- ng-packagr Compile and package Angular libraries in Angular Package Format
- rollup-plugin-dts Bundle TypeScript .d.ts declaration files with Rollup
- Vite Next Generation Frontend Tooling
