bun-bundler

Featured

This skill should be used when the user asks about "bun build", "Bun.build", "bundling with Bun", "code splitting", "tree shaking", "minification", "sourcemaps", "bundle optimization", "esbuild alternative", "building for production", "bundling TypeScript", "bundling for browser", "bundling for Node", or JavaScript/TypeScript bundling with Bun.

Web & Frontend 221 stars 31 forks Updated today MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
78
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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 ```bash # 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 ```typescript // 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 ```typescript await Bun.build({ // Entry points (required) entrypoints: ["./src/index.ts"], // Output directory outdir: "./dist", // Target environment target: "browser", // "browser" | "bun" | "node" // Output format format: "esm", // "esm" | "cjs" | "iife" // Minification minify: true, // or { whitespace: true, identifiers: true, syntax: true } // Code splitting splitting: true, // Source maps sourcemap: "external", // "none" | "inline" | "external" | "linked" // Naming patterns naming: { entry: "[dir]/[name].[ext]", ...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
10 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category