tsup

Configure tsup to bundle TypeScript libraries with ESM, CJS, and declarations.

4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill tsup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsup
Source: https://github.com/mgd34msu/goodvibes-gemini/tree/main/skills/tsup
Command: npx skills add https://github.com/mgd34msu/goodvibes-gemini --skill tsup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies and accelerates the process of bundling TypeScript libraries and applications, providing a fast, zero-configuration experience powered by esbuild.

Core Features & Use Cases

  • Zero-Config Bundling: Get started quickly with sensible defaults for TypeScript library builds.
  • Multiple Formats: Easily generate ESM, CJS, and IIFE outputs.
  • TypeScript Declarations: Automatically generate .d.ts files for better type safety.
  • Fast Builds: Leverages esbuild for near-instantaneous bundling.
  • Use Case: When building a new npm package in TypeScript, use this skill to configure tsup for optimal output formats, declarations, and fast build times.

Quick Start

Configure tsup for your TypeScript library by running npx tsup src/index.ts --format esm,cjs --dts.

Frequently Asked Questions about tsup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bundle a TypeScript npm package with zero configuration?

You can bundle a TypeScript npm package with zero configuration by using tsup, which provides sensible default settings powered by esbuild for near-instantaneous build times.

Can I generate dual ESM and CJS outputs for a JavaScript library?

Yes, you can generate dual ESM and CJS outputs for a JavaScript library by configuring tsup to target multiple formats simultaneously, ensuring broad compatibility for npm distribution.

What is the best way to automatically generate TypeScript declarations during a build?

The best way to automatically generate TypeScript declarations during a build is using tsup with the dts flag, which creates .d.ts files alongside your bundled output.

Does esbuild speed up TypeScript library bundling compared to other tools?

Yes, esbuild significantly speeds up TypeScript library bundling compared to other tools, providing near-instantaneous builds through tsup's zero-configuration integration.