bun-bundler

Solid

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 162 stars 25 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
74
Recency 20%
90
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 const result = await Bun.build({ entrypoints: ["./src/index.ts"], outdir: "./dist", }); if (!result.success) { console.error("Build failed:", result.logs); } ``` ## 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]", 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", ...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
6 months ago
Last Updated
2 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category