Open-source project
evanw/esbuild avatar
evanw/esbuild

esbuild: A Go-based bundler that trades plugin depth for raw speed

GitHub describes it as An extremely fast bundler for the web. The repository metadata lists Go as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.

40,090 stars1,360 forksGoMIT

At a glance

What is it?
esbuild is a Go-written bundler for JavaScript, CSS, TypeScript, and JSX that claims to be 10-100x faster than existing web build tools. It prioritizes speed over extensibility, making it a strong fit for simple builds but a poor fit for complex, plugin-heavy pipelines.
Who is it for?
Adopt esbuild if you need a fast, zero-config bundler for JavaScript, TypeScript, or CSS and you do not require deep plugin ecosystems or advanced code splitting. Avoid it if you rely on webpack's loader ecosystem or need granular control over the module graph.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 67 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 15, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The problem esbuild targets: build tool latency

esbuild starts from a blunt observation: existing web build tools are 10 to 100 times slower than they could be. That is a wide claim, but the project's README puts it front and center with a benchmark graphic. The pain point is real. Developers who work on large front-end codebases spend minutes waiting for bundlers to finish, then repeat that wait on every save in watch mode. esbuild wants to collapse that time to near zero without requiring a cache. It is built for teams that want a bundler that behaves like a compiler: fast, deterministic, and simple. The intended audience is not the user who needs a dozen loaders and custom transforms. It is the engineer who wants to ship a bundle quickly and move on. That focus on speed shapes every design decision in the project.

How esbuild achieves speed: Go and a parallel architecture

The speed comes from two sources: the implementation language and the internal design. esbuild is written in Go, a compiled language with a garbage collector and strong concurrency primitives. Most bundlers are written in JavaScript, which runs on a single thread with a JIT compiler. Go lets esbuild use multiple CPU cores for parsing and code generation. The README does not detail the internal architecture, but the visible result is that esbuild bundles JavaScript, CSS, TypeScript, and JSX without any external dependencies. It parses TypeScript directly, meaning no separate transpile step. It also handles both ESM and CommonJS module formats, which is a common source of complexity in other tools. The plugin API exists, but it is deliberately limited. That limitation is a trade-off: plugins cannot intercept the module graph in arbitrary ways, which is what allows esbuild to parallelize aggressively. The documentation at esbuild.github.io/plugins/ presumably explains the exact constraints, but the high-level point is that esbuild sacrifices flexibility for speed.

Getting esbuild running: CLI, JS API, and Go API

The README points to the getting started guide on the official website, but the API surface is clear from the feature list. There are three ways to use esbuild: a command-line interface, a JavaScript API, and a Go API. The CLI is the simplest entry point. A typical command would be `esbuild app.js --bundle --outfile=out.js`. The `--bundle` flag tells esbuild to follow imports and produce a single file. For development, you can add `--watch` for file watching or `--serve` for a local server. Minification is a flag: `--minify`. Source maps are enabled with `--sourcemap`. The JavaScript API is for integration into build scripts or tools like Gulp or npm scripts. The Go API is for developers who want to embed esbuild into a Go application. The README mentions all three, so you can choose the interface that fits your workflow. There is no configuration file mentioned, which is consistent with esbuild's philosophy of minimal setup. You pass options on the command line or in the API call.

What esbuild handles out of the box

The feature list is short but covers the essentials. esbuild bundles ESM and CommonJS, so it can handle both modern and legacy module formats. It also bundles CSS, including CSS modules, which is a feature many bundlers only support via plugins. Tree shaking is built in, meaning unused exports are removed from the final bundle. Minification and source maps are also built in, so you do not need separate tools like UglifyJS or source-map-support. The built-in support for TypeScript and JSX is notable because it removes the need for a separate transpiler like Babel or tsc. For a project that uses plain TypeScript with no custom JSX transforms, esbuild can replace a multi-step build pipeline with a single command. This is the sweet spot for esbuild: a simple, fast, self-contained bundler that handles the standard web stack without configuration.

Where esbuild falls short: plugin limitations and code splitting

The biggest limitation is the plugin API. The README lists plugins as a feature, but the documentation at esbuild.github.io/plugins/ would reveal that plugins are restricted. They cannot, for example, implement custom loaders that transform files in arbitrary ways. This is a deliberate design choice to maintain speed, but it means esbuild is not a drop-in replacement for tools like webpack, which has a vast plugin ecosystem. If you need to process Vue single-file components, custom asset formats, or framework-specific transforms, esbuild likely cannot do it without a plugin that does not exist. Another limitation is code splitting. The README does not mention code splitting as a feature. It says esbuild bundles ESM and CommonJS, but it does not claim to split bundles into async chunks. For applications that need lazy loading, this could be a deal-breaker. The README also does not mention support for older browser targets, so you would need to check the documentation for that. In short, esbuild is the wrong tool if you need a highly customizable build pipeline or advanced chunking.

The alternative: webpack and the cost of flexibility

The obvious alternative is webpack, which is the most widely used bundler for web applications. webpack is written in JavaScript and has a massive ecosystem of loaders and plugins. It can handle almost any file type with the right loader, and it supports advanced code splitting, dynamic imports, and long-term caching. The difference in approach is stark: webpack is a general-purpose build system, while esbuild is a specialized bundler that does one thing quickly. webpack's flexibility comes at a cost. It is slower, often by an order of magnitude, and requires configuration. A typical webpack config file is dozens of lines long. esbuild's config is a few flags. If your project already uses webpack and you have invested in custom loaders, switching to esbuild would require reimplementing those loaders as esbuild plugins, which may not even be possible. For a new project with simple needs, esbuild is a viable starting point. For an existing complex project, webpack remains the safer choice.

Maintenance and license considerations

esbuild is actively maintained. The last push was August 2026, and the project has a regular release cadence: v0.28.0 in April, v0.28.1 in June, and v0.28.2 in August. That suggests a healthy maintenance pace. The license is MIT, which is permissive and allows commercial use, modification, and redistribution without restrictions beyond preserving the copyright notice. There is no copyleft obligation. For an engineering team, the maintenance cost is low because esbuild is a single binary or a small npm package, and updates are likely to be backward compatible given the 0.x versioning. However, the 0.x status means the API may change between minor versions, so you should pin the version in your build system. The upgrade cost is minimal if you use the CLI, but if you use the JavaScript API, you should review the changelog before upgrading. The project's website and documentation are the primary resources, and they appear to be kept up to date.

Editorial conclusion

Adopt esbuild if you need a fast, zero-config bundler for JavaScript, TypeScript, or CSS and you do not require deep plugin ecosystems or advanced code splitting. Avoid it if you rely on webpack's loader ecosystem or need granular control over the module graph. Before adopting, verify that your project's use of dynamic imports and CSS modules works as expected, and check the current plugin registry for any missing functionality. esbuild is a tool that solves speed first and everything else second, so measure your build time and test your output before committing.

Frequently asked questions

What is ESBuild used for?

esbuild is a bundler for the web, written in Go, whose major features include JavaScript, CSS, TypeScript, and JSX handled in one tool, bundling of ESM and CommonJS modules, CSS including CSS modules, tree shaking, minification, and source maps, plus a local server, watch mode, and plugins. It offers a straightforward API for the CLI, JavaScript, and Go.

Does ESBuild do tree shaking?

Yes. Tree shaking is named in the project's major features list, alongside minification and source maps, and next to bundling of ESM and CommonJS modules and of CSS including CSS modules. The same list also claims extreme speed without needing a cache.

what is esbuild written in

Go. The repository's primary language is Go and its module is github.com/evanw/esbuild, and the Makefile builds the command from cmd/esbuild with CGO disabled. Alongside that, the project ships an API for JavaScript and the tree carries npm/ for the package wrapper, pkg/ and lib/ for the Go and JavaScript APIs.

how to install esbuild

The README contains no install command; it points to the getting started page on the project website. To build from source, the Makefile compiles the command with CGO_ENABLED=0 and flags that strip debug info, clear the build id, and trim the build path, using the Go toolchain version recorded in the go.version file.

Should I use ESBuild or Webpack?

The repository makes no comparison with Webpack. Its own stated goal is to bring about a new era of build tool performance and an easy-to-use modern bundler, with the claim that current web build tools are 10 to 100 times slower than they could be. That claim is illustrated by an image rather than a table, so the choice has to be made from the feature list and your own measurement.

Is ESBuild faster than vite?

The repository does not compare esbuild with Vite. The only performance statement on the front page is that current web build tools for the web are 10 to 100 times slower than they could be, and the feature list claims extreme speed without needing a cache. A comparison with any specific tool has to be measured on your own project.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/evanw-esbuild.svg)](https://hysenlabs.com/projects/evanw-esbuild)