tsdown

Bundle TypeScript libraries into multiple formats with Rolldown-based builds.

1|Updated Apr 4, 2023
One-click install
npx skills add https://github.com/ElderEvil/falloutProject --skill tsdown-elderevil
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tsdown
Source: https://github.com/ElderEvil/falloutProject/tree/main/.agents/skills/tsdown
Command: npx skills add https://github.com/ElderEvil/falloutProject --skill tsdown-elderevil

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines bundling TypeScript and JavaScript libraries into multiple formats with fast, reliable builds powered by Rolldown.

Core Features & Use Cases

  • Multi-format bundles: supports esm, cjs, iife, and umd outputs from a single config.
  • Type declarations: generates TypeScript declarations when enabled.
  • Migration-friendly: facilitates migrating from tsup and works well in monorepos.
  • Use Case: Library authors publish libraries with proper main/module/exports across formats.

Quick Start

Install tsdown, create a minimal config, and run the build to generate dist outputs.

Frequently Asked Questions about tsdown

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

FAQPage Schema
How do I bundle a TypeScript library into multiple formats like esm and cjs?

You can bundle a TypeScript library into multiple formats by using a Rolldown-powered build tool to compile esm, cjs, iife, and umd outputs from a single configuration. This generates the necessary distribution files for publishing.

What is the best way to migrate a TypeScript library build from tsup?

Migrating a TypeScript library build from tsup is supported through a migration-friendly configuration approach. It provides fast, reliable builds powered by Rolldown while maintaining support for multi-format outputs.

Does bundling TypeScript libraries with this approach support monorepos?

Bundling TypeScript libraries with this approach fully supports monorepos. It allows library authors to build and publish packages with proper main, module, and exports fields across multiple formats within a monorepo structure.

Can I generate TypeScript declaration files when bundling my library?

You can generate TypeScript declaration files by enabling type declaration generation during the library build process. This ensures your bundled outputs include the necessary dts files for TypeScript consumers.

How does Rolldown improve the TypeScript library build process?

Rolldown improves the TypeScript library build process by providing lightning-fast compilation speeds. It streamlines bundling TS and JS libraries into multiple formats with reliable, high-performance builds.

Are there limitations when using plugin-based extensibility for library bundling?

Plugin-based extensibility allows you to customize the library bundling process, but relies on the specific plugin ecosystem available. Ensure your required plugins are compatible with the Rolldown-based build environment to avoid integration limitations.