bun build ./src/index.ts --outdir ./dist

Category: Node.js & npm/yarn

bun build ./src/index.ts --outdir ./dist

Bundle an app with the bun bundler

Compiles src/index.ts and its imports into a single JavaScript file in the dist folder, bundling TypeScript and JSX natively. Bundling resolves node_modules and outputs deployable files. Add --watch to rebuild on change.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.