Bun Bundler
Bun's esbuild-compatible JavaScript and TypeScript bundler, covering CLI and Bun.build usage for production builds.
- CCM score
- 52 of 100
- skills.sh installs
- 423
- GitHub stars
- 257
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers bundling workflows for browser, Bun, and Node targets, including code splitting, minification, and sourcemaps
- Documents the
bun buildCLI flags (--outdir,--target,--format,--splitting,--sourcemap) alongside the equivalentBun.buildoptions - Includes loader mappings for JS, TS, JSX, JSON, TOML, text, file, base64, dataurl, and CSS, plus a plugin API with resolve and load hooks
- Designed for developers building production bundles or libraries who need to handle
Bun.builderrors with try/catch
Install
$ npx -y skills add secondsky/claude-skills --skill bun-bundler -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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"
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Frontend & UI Code, Technical Documentation, CLI & Terminal
- First seen
- Jun 3, 2026
Questions
What does the bun-bundler skill do?
The bun-bundler skill teaches the agent to use Bun's built-in bundler, which bundles JavaScript and TypeScript with options for code splitting, minification, sourcemaps and tree shaking. It covers the bun build CLI, the Bun.build JavaScript API, target environments for browser, Bun and Node, and custom plugins and loaders.
How do I install the bun-bundler skill?
Run npx -y skills add secondsky/claude-skills --skill bun-bundler -y in a project to install it. Once installed, bun-bundler lets the agent write Bun.build calls and bun build commands for production bundles.
Is bun-bundler a good alternative to esbuild?
bun-bundler is listed in the Frontend and UI Code category on Claude Marketplaces, alongside vercel-react-best-practices, web-design-guidelines and design-taste-frontend. It targets Bun's esbuild-compatible bundler, so it suits projects that already build with Bun and want a native alternative to esbuild.
Does bun-bundler need any API keys or extra tools?
bun-bundler works with Bun's built-in bundler and needs no API keys or accounts. The skill's guidance assumes Bun is installed in the project, and its build scripts run with bun run build.ts.
More from secondsky/claude-skills
All 116- Turborepo423
- Api Versioning Strategy421
- Recommendation System421
- Logging Best Practices419
- Bun Hot Reloading418
- Claude Hook Writer418
- Claude Code Bash Patterns417
- Plan Interview417
- Bun React Ssr416
- Bun Shell416
- Bun Websocket Server414
- Bun Redis412
- Ml Pipeline Automation412
- Nuxt Core411
- Nuxt Data411
- Bun Ffi409
- Bun Nuxt409
- Bun Jest Migration408
- Bun Macros407
- Multi Ai Consultant407
- Model Deployment405
- Graphql Implementation403
- Jest Generator402
- Thesys Generative Ui393
Similar to Bun Bundler
More Frontend & UI Codeesbuild-bundlerSkillmindrally/skills749 installsBest-practice guide for configuring esbuild bundling, minification, and TypeScript setup with CLI and API examples.
bun-runtimeSkillsecondsky/claude-skills438 installsFast all-in-one JavaScript runtime covering CLI flags, watch and hot modes, env loading, and module resolution.
bunPluginsecondsky/claude-skills254 starsComprehensive Bun runtime toolkit covering runtime, package manager, bundler, testing, HTTP servers, WebSockets, databases, framework integrations (Hono, Next.j
rollup-bundlerSkillmindrally/skills701 installsBest-practices guide for Rollup.js configuration, ES modules, and library bundling with tree-shaking focus.
bun-developmentSkillsickn33/agentic-awesome-skills2.9K installsFast JavaScript and TypeScript development guidance for the Bun runtime, including Node.js migration and Bun's built-in tooling.