CmdID

CmdID / Commands

bun-build

Bundle JavaScript and TypeScript files with Bun's fast native bundler. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Bundle an entry point to a single output file

bun build path/to/entry.ts --outfile path/to/output.jsIdentify

Bundle multiple entry points to an output directory

bun build path/to/entry1.ts path/to/entry2.ts ... --outdir path/to/distIdentify

Bundle with source maps for debugging

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

Bundle with minification for production

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

Bundle with a specific target environment

bun build path/to/entry.ts --outfile path/to/output.js --target browserIdentify

Bundle to a standalone executable

bun build path/to/entry.ts --compile --outfile path/to/executableIdentify

Watch for file changes and rebuild automatically

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

Bundle with external dependencies not included in the output

bun build path/to/entry.ts --outfile path/to/output.js --external react react-domIdentify