biu

⚡ zero-config bundler · powered by Bun

A zero-config, high-performance bundler for HTML + TypeScript/JavaScript, powered by Bun. Smart module splitting, content hashing, watch mode, dev server, optional Next.js-style backend, and offline CDN caching — all in one binary.

Install

$ curl -fsSL https://mindon.dev/biu/install | bash

Quick Start

# Place `biu` in your PATH, then from any project directory:
biu                        # Build ./src → ./dist
biu ./src ./dist           # Explicit source & output dirs
biu --serve 3000           # Dev server with live reload

Note: if there's a ./backend directory, it will be used as Next.js-style backend.

Command Syntax

biu [options] [srcDir] [outDir]
ArgumentDefaultDescription
srcDir./srcSource directory
outDir./distOutput directory

Options

OptionDescription
--watchWatch mode — rebuild on file changes
--static <dir>Static assets directory (default: ./static)
--post-build <file>Run .sh/.ts/.js script after each build
--serve [port]Start dev server (default port: 3000, implies --watch)
--build [outfile]Self-compile to standalone binary (default: ./biu)
-v, --versionShow version
-h, --helpShow help

Options can appear in any order.

Examples

Basic build

biu ./src ./dist

Watch mode with dev server

biu --serve 8080

Custom static directory + post-build script

biu --static ./public --post-build ./scripts/deploy.sh

Smart Module Splitting

Environment Variables

VariableDescription
BIU_ASSETS_EXTSExtra asset extensions, e.g. "glb,gltf,hdr"
BIU_EXCLUDEDRegex pattern to exclude files, e.g. "test|spec"

More