npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pixpilot/tsdown-config

v0.3.0

Published

Tsdown configuration for PixPilot projects.

Readme

@pixpilot/tsdown-config

Modern, opinionated tsdown configuration for TypeScript projects.

Note: This configuration is designed for our organization's projects but is adaptable for your needs. Settings may evolve to enhance our codebase.

Installation

npm install -D @pixpilot/tsdown-config

Usage

Create a tsdown.config.ts file in your project root:

import { defineConfig } from '@pixpilot/tsdown-config';

export default defineConfig({
  // Your custom options here
});

Features

Default Configuration

The configuration includes sensible defaults:

  • Entry: src/index.ts
  • Formats: ESM and CommonJS
  • TypeScript declarations: Enabled
  • Tree-shaking: Enabled
  • Minification: Enabled
  • Clean output: Enabled before each build

Bundle Dependencies

By default, all dependencies and peerDependencies are externalized. To bundle them instead:

export default defineConfig({
  bundleDependencies: true,
});

API

defineConfig(options)

Creates a tsdown configuration with opinionated defaults.

Options

Extends all tsdown options with the following additions:

bundleDependencies
  • Type: boolean
  • Default: false

Whether to include external dependencies in the final bundle. When false, all dependencies and peerDependencies are externalized.

bundleSize
  • Type: number | { maxSize: number; throwError?: boolean } | boolean
  • Default: undefined

Check the size of the final bundle files.

  • number: Maximum size in bytes. Throws an error if exceeded.
  • object: Configuration object with:
    • maxSize (required): Maximum size in bytes
    • throwError (optional, default: true): Whether to throw an error or just warn
  • boolean: Enable/disable size checking (must provide config object or number if true)

Examples:

// Example configurations:

// Throw error if bundle exceeds 500KB
const config1 = { bundleSize: 500 * 1024 };

// Just warn, don't fail the build
const config2 = {
  bundleSize: {
    maxSize: 500 * 1024,
    throwError: false,
  },
};

The plugin will output during build:

  • index.js: 245KB / 500KB (success)
  • ⚠️ Bundle size exceeded: index.js is 600KB (max: 500KB) (warning or error)

Examples

Basic Library Build

import { defineConfig } from '@pixpilot/tsdown-config';

export default defineConfig({
  entry: ['src/index.ts'],
  format: ['esm', 'cjs'],
  bundleSize: 500 * 1024, // 500KB limit
});

Bundle Everything

import { defineConfig } from '@pixpilot/tsdown-config';

export default defineConfig({
  bundleDependencies: true,
  bundleSize: {
    maxSize: 2 * 1024 * 1024, // 2MB
    throwError: false, // Just warn
  },
});

Build Output

Generates ESM (dist/index.js) and CommonJS (dist/index.cjs) formats with TypeScript declarations. Files are cleaned before each build.

License

MIT