bun-bundler

仓库创建 2025年11月8日最近提交 29 天前SkillHot 收录 22 天前
▸ 精选理由

适合想用 Bun 替代 esbuild 或显著加速构建流程的开发者。

这个 Skill 做什么

使用 Bun 的高速打包器对 JS/TS 项目进行构建与优化。

用 Bun 的打包器把 JS/TS 项目打包成浏览器或 Node 可用的产物,支持代码分割、tree-shaking、压缩和 sourcemap。在做生产构建、想要更快的编译或把 TypeScript 原生打包时会用到。特点是性能极快、与 esbuild 兼容且由 Bun 引擎原生驱动。

▸ 展开 SKILL.md 英文原文

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.

开发编程打包性能优化TypeScript通用
180
Stars
28
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/secondsky/claude-skills/main/plugins/bun/skills/bun-bundler/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/secondsky/claude-skills/main/plugins/bun/skills/bun-bundler/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# 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 (
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有