Bundles and minifies JavaScript, TypeScript, JSX, and CSS for the web. Offers CLI, JavaScript, and Go APIs with watch mode and a local dev server.
Overview
esbuild is a bundler focused on fast builds for modern web frontends. It handles JavaScript, TypeScript, JSX, TSX, and CSS in one tool without requiring a separate cache layer for typical speed gains.
It can bundle both ESM and CommonJS modules, apply tree shaking and minification, and emit source maps. CSS bundling includes support for CSS modules. A plugin interface extends behavior for custom workflows.
Developers invoke esbuild through a command-line binary, a JavaScript API, or a Go API depending on their stack. Watch mode rebuilds on file changes, and a built-in local server supports development feedback loops.
The project positions itself as a straightforward modern bundler aimed at reducing time spent waiting on production and development builds compared with older toolchains.
Key features
- JavaScript and TypeScript bundling
- JSX and TSX support
- CSS and CSS modules
- Tree shaking and minification
- Source map output
- CLI, JS, and Go APIs
- Watch mode
- Local dev server and plugins
Use cases
- Production web asset bundling
- Library and app build pipelines
- Fast local development rebuilds
- Tooling embedded via JS API
- CSS and JS combined builds