aceternity-ui
100+ animated React components (Aceternity UI) for Next.js with Tailwind. Use for hero sections, parallax, 3D effects, or…
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
Claude Code
$ npx -y skills add secondsky/claude-skills --skill bun-bundler --agent claude-code
Codex
$ npx skills add secondsky/claude-skills --skill bun-bundler -a codex -y
Cursor
$ npx skills add secondsky/claude-skills --skill bun-bundler -a cursor -y
Gemini CLI
$ npx skills add secondsky/claude-skills --skill bun-bundler -a gemini-cli -y
GitHub Copilot
$ npx skills add secondsky/claude-skills --skill bun-bundler -a github-copilot -y
OpenCode
$ npx skills add secondsky/claude-skills --skill bun-bundler -a opencode -y
Windsurf
$ npx skills add secondsky/claude-skills --skill bun-bundler -a windsurf -y
name: bun-bundler description: 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. metadata: version: "1.0.0" license: MIT
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.
# 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
// 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);
}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]",
chunk: "[name]-[hash].[ext]",
asset: "[name]-[hash].[ext]",
},
// Define globals
define: {
"process.env.NODE_ENV": JSON.stringify("production"),
},
// External packages
external: ["react", "react-dom"],
// Loaders
loader: {
".svg": "text",
".png": "file",
},
// Plugins
plugins: [myPlugin],
// Root directory
root: "./src",
// Public path for assets
publicPath: "/static/",
});bun build <entrypoints> [flags]
| Flag | Description | |------|-------------| | `--outdir` | Output directory | | `--outfile` | Output single file | | `--target` | `browser`, `bun`, `node` | | `--format` | `esm`, `cjs`, `iife` | | `--minify` | Enable minification | | `--minify-whitespace` | Minify whitespace only | | `--minify-identifiers` | Minify identifiers only | | `--minify-syntax` | Minify syntax only | | `--splitting` | Enable code splitting | | `--sourcemap` | `none`, `inline`, `external`, `linked` | | `--external` | Mark packages as external | | `--define` | Define compile-time constants | | `--loader` | Custom loaders for extensions | | `--public-path` | Public path for assets | | `--root` | Root directory | | `--entry-naming` | Entry point naming pattern | | `--chunk-naming` | Chunk naming pattern | | `--asset-naming` | Asset naming pattern |
await Bun.build({
entrypoints: ["./src/index.ts"],
target: "browser",
outdir: "./dist",
});await Bun.build({
entrypoints: ["./src/server.ts"],
target: "bun",
outdir: "./dist",
});await Bun.build({
entrypoints: ["./src/server.ts"],
target: "node",
outdir: "./dist",
});await Bun.build({
entrypoints: ["./src/index.ts", "./src/admin.ts"],
splitting: true,
outdir: "./dist",
});Shared dependencies are extracted into separate chunks automatically.
| Loader | Extensions | Output | |--------|------------|--------| | `js` | `.js`, `.mjs`, `.cjs` | JavaScript | | `jsx` | `.jsx` | JavaScript | | `ts` | `.ts`, `.mts`, `.cts` | JavaScript | | `tsx` | `.tsx` | JavaScript | | `json` | `.json` | JavaScript | | `toml` | `.toml` | JavaScript | | `text` | - | String export | | `file` | - | File path export | | `base64` | - | Base64 string | | `dataurl` | - | Data URL | | `css` | `.css` | CSS file |
Custom loaders:
await Bun.build({
entrypoints: ["./src/index.ts"],
loader: {
".svg": "text",
".png": "file",
".woff2": "file",
},
});const myPlugin = {
name: "my-plugin",
setup(build) {
// Resolve hook
build.onResolve({ filter: /\.special$/ }, (args) => {
return { path: args.path, namespace: "special" };
});
// Load hook
build.onLoad({ filter: /.*/, namespace: "special" }, (args) => {
return {
contents: `export default "special"`,
loader: "js",
};
});
},
};
await Bun.build({
entrypoints: ["./src/index.ts"],
plugins: [myPlugin],
});// Bun 1.2+: Bun.build rejects on failure. Use try/catch to surface build
// errors (or pass { throw: false } and keep the legacy { success, logs } shape).
try {
const result = await Bun.build({
entrypoints: ["./src/index.ts"],
outdir: "./dist",
});
// Access outputs
for (const output of result.outputs) {
console.log(output.path); // File path
console.log(output.kind); // "entry-point" | "chunk" | "asset"
console.log(output.hash); // Content hash
console.log(output.loader); // Loader used
// Read content
const text = await output.text();
}
} catch (err) {
console.error("Build failed:", err);
process.exit(1);
}await Bun.build({
entrypoints: ["./src/index.ts"],
outdir: "./dist",
target: "browser",
minify: true,
sourcemap: "external",
splitting: true,
define: {
"process.env.NODE_ENV145 production-ready skills for Claude Code CLI 🔌 Platform / Harness Support These plugins ship as Claude Code marketplace plugins (.claude-plugin/ manifests) and Codex CLI plugins (.codex-plugin/ manifests).
100+ animated React components (Aceternity UI) for Next.js with Tailwind. Use for hero sections, parallax, 3D effects, or…
Secure API authentication with JWT, OAuth 2.0, API keys. Use for authentication systems, third-party integrations,…
Creates comprehensive API changelogs documenting breaking changes, deprecations, and migration strategies for API consumers. Use…
Verifies API contracts between services using consumer-driven contracts, schema validation, and tools like Pact. Use when testing…
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use…
Implements standardized API error responses with proper status codes, logging, and user-friendly messages. Use when building…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.