bun-build

Verified for current stable LTS

Bun Build Commands

Bun Build command syntax with verified terminal examples.

Commands

12 commands for Bun Build

bun-build

Bun Build Command: Bundle Multiple Entry Points

bun build <path/to/entry1.ts path/to/entry2.ts ...> --outdir <path/to/dist>
bun-build

Bun Build Command: Bundle Multiple Entry Points To Output Directory

bun build <path/to/entry1.ts path/to/entry2.ts ...> --outdir <path/to/dist>
bun-build

Bun Build Command: Bundle Single Entry Point To Output File

bun build <path/to/entry.ts> --outfile <path/to/output.js>
bun-build

Bun Build Command: Bundle Single Output File

bun build <path/to/entry.ts> --outfile <path/to/output.js>
bun-build

Bun Build Command: Bundle To Standalone Executable

bun build <path/to/entry.ts> --compile --outfile <path/to/executable>
bun-build

Bun Build Command: Bundle With External Dependencies

bun build <path/to/entry.ts> --outfile <path/to/output.js> -e <react react-dom>
bun-build

Bun Build Command: Bundle With Minification

bun build <path/to/entry.ts> --outfile <path/to/output.js> --minify
bun-build

Bun Build Command: Bundle With Source Maps

bun build <path/to/entry.ts> --outfile <path/to/output.js> --sourcemap
bun-build

Bun Build Command: Bundle With Specific Target Environment

bun build <path/to/entry.ts> --outfile <path/to/output.js> --target <browser|bun|node>
bun-build

Bun Build Command: Bundle With Target Environment

bun build <path/to/entry.ts> --outfile <path/to/output.js> --target <browser|bun|node>
bun-build

Bun Build Command: Watch For File Changes

bun build <path/to/entry.ts> --outfile <path/to/output.js> --watch
bun-build

Bun Build Command: Watch For File Changes And Rebuild

bun build <path/to/entry.ts> --outfile <path/to/output.js> --watch

Suggest a Bun Build Command

Submit missing workflows, corrections, or verified alternatives for this tool.

FAQ

Coverage: Focused examples for common Bun Build workflows.

Verified version: current stable LTS.

Verification: Test commands in a disposable workspace and submit notes for edge cases.