← All open source projects

esbuild

evanw/esbuild

esbuild is a very fast bundler and minifier for JavaScript, TypeScript, CSS, and JSX.

Forks 1,316
Author evanw
Language Go
License MIT
Synced 2026-06-27

What It Is

esbuild is a bundler and minifier for web projects. It handles JavaScript, CSS, TypeScript, and JSX, bundles ESM and CommonJS, and exposes command-line, JavaScript, and Go APIs.

The project’s main goal is speed. esbuild frames the problem directly: current web build tools can be many times slower than they need to be.

Evan Wallace built esbuild not as another configuration layer, but as a fast low-level tool that can be used directly or inside a larger system.

What Is Inside

esbuild is written in Go and performs much of the work itself: parsing source files, linking modules, transforming TypeScript and JSX, and minifying code and styles.

The project does not try to reproduce every feature of older bundlers. It covers common operations very quickly and leaves more specialized scenarios to plugins or tools built on top.

That architecture explains its popularity. Even when the final build uses another tool, esbuild is often used for fast transforms, prebundling, or development-time work.

How People Use It

In a small project, esbuild can be the primary bundler: choose an entry file, enable bundling, and produce a browser-ready file.

In larger systems, esbuild often works inside other tools. It speeds up TypeScript, JSX, and dependency handling while the upper layer manages routing, server rendering, or more complex configuration.

The limitation is that esbuild intentionally does not cover every edge case. Projects that depend on unusual transforms or legacy bundler behavior should test migration carefully.

Minimal Build

The command shows the basic flow: take an entry file, bundle dependencies, minify the result, and write it to a public folder.

Strengths And Limits

esbuild’s strength is speed without requiring a cache. That matters in development, tests, and services where builds run frequently.

The tradeoff is deliberate focus. The project does not try to be an infinitely extensible platform, so unusual tasks may be easier with another tool.

esbuild fits web applications, libraries, packages, and infrastructure tasks where speed and clear output matter. Projects that need full control over every build step should check compatibility first.

Example

Single Build Command

The example shows a common use: entry file, bundling, minification, source map, and output path.

Language: Bash
npx esbuild src/app.tsx \
  --bundle \
  --minify \
  --sourcemap \
  --outfile=public/app.js