
Bun Bundler
If you're bundling JavaScript or TypeScript with Bun instead of webpack or esbuild, this gives Claude the full context on Bun.build. It covers CLI usage, the JavaScript API, code splitting, minification, sourcemaps, custom loaders, and plugin authoring. The documentation is thorough with actual config examples for different targets (browser, Node, Bun runtime) and common patterns like production builds or library packaging. Honest take: Bun's bundler is genuinely fast and the API surface is clean, but the ecosystem is still young. Use this when you're already committed to Bun or need to help Claude troubleshoot builds that aren't working as expected.
- skills.sh installs
- 334
- GitHub stars
- 248
- last updated
- Aug 21, 2026
Install
$ npx -y skills add secondsky/claude-skills --skill bun-bundler --agent claude-codeInstalls into .claude/skills of the current project.
Files
Bun Bundler
Bun's bundler is a fast JavaScript/TypeScript bundler built on the same engine as Bun's runtime. It's an esbuild-compatible alternative with native performance.
Quick Start
CLI
# Basic bundle
bun build ./src/index.ts --outdir ./dist
# Production build
bun build ./src/index.ts --outdir ./dist --minify
# Multiple entry points
bun build ./src/index.ts ./src/worker.ts --outdir ./dist
JavaScript API
// Since Bun 1.2, Bun.build REJECTS on failure (throws).
// Wrap in try/catch to handle errors; pass { throw: false } to restore the
// old resolve-with-{ success, logs } contract if you prefer that style.
try {
const result = await Bun.build({
entrypoints: ["./src/index.ts"],
outdir: "./dist",
});
console.log(`Built ${result.outputs.length} files`);
} catch (err) {
console.error("Build failed:", err);
process.exit(1);
}
Bun.build Options
await Bun.build({
// Entry points (required)
entrypoints: ["./src/index.ts"],
// Output directory
outdir: "./dist",
// Target environment
target: "browser", // "browser" | "bun" | "node"
Sponsors
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- DevOps & CI/CD, Automation & Workflows
- First seen
- Jun 3, 2026
More from secondsky/claude-skills
All 146- Bun Workers333
- Bun Shell331
- Bun React Ssr330
- Bun Tanstack Start329
- Cloudflare Workers Performance329
- Bun Hot Reloading328
- Bun Redis328
- Bun Ffi326
- Bun Jest Migration326
- Bun Websocket Server326
- Cloudflare Workers Runtime Apis326
- Swift Best Practices326
- Bun Nuxt323
- Bun Macros322
- Cloudflare Workers Frameworks321
- Supabase Postgres Best Practices319
- Cloudflare Workers Ci Cd318
- Cloudflare Workers Dev Experience317
- Cloudflare Workers Observability315
- Cloudflare Workers Migration310
- Cloudflare Workers Multi Lang310
- Verification Before Completion310
- Nuxt Studio308
- Neon Vercel Postgres294