An extremely fast, zero-config bundler for TypeScript & JavaScript, powered by Bun and Oxc.
Bundler | Format | Build Time | Relative Speed |
---|---|---|---|
bunup | esm, cjs | 6ms | ⚡️ 9.7x faster |
bunup (+ dts) | esm, cjs | 32ms | ⚡️ 25.8x faster |
tsdown | esm, cjs | 22ms | 2.6x faster |
tsdown (+ dts) | esm, cjs | 52ms | 15.9x faster |
tsup | esm, cjs | 58ms | baseline |
tsup (+ dts) | esm, cjs | 825ms | baseline |
Lower build time is better. Benchmark run on the same code with identical output formats.
# Using Bun
bun add bunup -d
# Using pnpm
pnpm add bunup -D
# Using npm
npm i bunup -D
# Using Yarn
yarn add bunup --dev
Create a simple TypeScript file:
// src/index.ts
export function greet(name: string): string {
return `Hello, ${name}!`;
}
Bundle it with bunup:
bunup src/index.ts
This will create a bundled output in the dist
directory.
Add a build script to your package.json
:
{
"name": "my-package",
"scripts": {
"build": "bunup src/index.ts --format esm,cjs --dts"
}
}
Then run:
npm run build
Create a bunup.config.ts
file for more control:
import {defineConfig} from 'bunup';
export default defineConfig({
entry: ['src/index.ts'],
outDir: 'dist',
format: ['esm', 'cjs'],
dts: true,
minify: true,
});
For complete documentation, visit the full documentation.
For guidelines on contributing, please read the contributing guide.
We welcome contributions from the community to enhance Bunup's capabilities and make it even more powerful.