designwithfocus

JavaScript & front end

What Is esbuild? A JavaScript Bundler Written in Go

By Design With Focus Team 6 min read
A terminal bundling JavaScript, CSS, and TypeScript into one output file

Short answer

esbuild is a JavaScript bundler written in Go that the project site calls an extremely fast bundler for the web. Its chart, as of December 2026, times a production bundle of 10 copies of three.js at 0.39 seconds, against longer times for Parcel 2, Rollup 4 with terser, and webpack 5. It bundles JavaScript, CSS, TypeScript, and JSX, including ESM and CommonJS.

Last verified against the sources listed below.

Key takeaways

  • The esbuild site describes it as an extremely fast bundler for the web, with a Go, JS, and CLI API.
  • The published chart times one three.js production bundle at 0.39 seconds for esbuild.
  • The same chart lists Parcel 2 at 14.91 seconds, Rollup 4 plus terser at 34.10 seconds, and webpack 5 at 41.21 seconds.
  • The FAQ says type checking is not planned in core. Run tsc separately.
  • The getting started page says the WebAssembly build can be about 10 times slower than the native package.

What is esbuild, on the project’s own site, is an extremely fast bundler for the web. The homepage says the main goal is build-tool performance, and an easy-to-use modern bundler along the way.

It sits in the same family of tools as the rest of JavaScript tooling. The difference the site stresses is speed without a cache, and a small API.

How does a bundle differ from a module?

MDN’s module guide says a module is a unit of code that can be imported when needed, and that modules run in their own scope in strict mode. Modern browsers can load modules without a transpiler.

MDN also says native modules do not make bundlers obsolete. Bundlers still partition code into chunks and can minify, drop dead code, and tree-shake. esbuild is one of those bundlers. The homepage says it bundles ESM and CommonJS, which is the split covered in ES modules versus CommonJS.

The homepage feature list is short. JavaScript, CSS, TypeScript, and JSX are built in. CSS includes CSS modules.

Tree shaking, minification, and source maps are included. There is a local server, watch mode, and plugins. The API is documented for the CLI, for JavaScript, and for Go.

What does the project’s speed chart actually say?

The homepage prints one comparison, as of December 2026. It is the time to do a production bundle of 10 copies of the three.js library from scratch, using default settings, including minification and source maps.

Tool named on esbuild.github.io Time on that chart
esbuild 0.39 seconds
Parcel 2 14.91 seconds
Rollup 4 + terser 34.10 seconds
webpack 5 41.21 seconds

The sentence above the chart says current build tools for the web are 10 to 100 times slower than they could be. That line is about the category, not a second benchmark. The four times in the table are the only head-to-head numbers on the homepage.

Two other “10 times” lines live on the getting started page, and they are not the chart. The WebAssembly package can sometimes be 10 times slower than the native esbuild package, and the page says it is often an order of magnitude slower. Running esbuild without Yarn’s command-line wrapper can result in esbuild running 10 times faster, because the page says Yarn’s CLI adds overhead to every command.

Why does the FAQ say the tool is fast?

The FAQ lists four reasons. It is written in Go and compiles to native code. Most other bundlers, the page says, are written in JavaScript, and a command-line run is a poor case for a JIT because the VM sees the bundler code for the first time on every run.

Go’s own documentation says Go compiles quickly to machine code and that its concurrency mechanisms are meant to use multicore machines. The esbuild FAQ adds that Go shares memory between threads, while JavaScript must serialize data between threads. Parsing and code generation are described as parallel. Linking is described as mostly serial.

The third reason is that the tool is written from scratch, including its TypeScript parser, instead of calling the official TypeScript compiler. The fourth is memory. The FAQ says esbuild touches the whole JavaScript AST three times: one pass for lexing, parsing, scope, and symbols; one for binding, minify, JSX or TypeScript to JavaScript, and ESNext to ES2015; and one for identifier minify, whitespace, code generation, and source maps.

What does a first build look like?

The getting started page installs a native executable with npm:

npm install --save-exact --save-dev esbuild

A sample app.jsx imports React and uses JSX. The bundle command is esbuild app.jsx --bundle --outfile=out.js. The page says the .jsx extension is enough to convert JSX, and that --loader:.js=jsx is how you allow JSX inside .js files.

Browser output is the default. Production flags on that page include --minify, --sourcemap, and a --target list of browsers.

The JavaScript API is esbuild.build() with entryPoints, bundle, and outfile. Plugins work with the async API, not buildSync. An SVG you turn into a component with the SVG to JSX tool is the sort of file that command can include. The tool does not run the bundler.

You cannot copy node_modules to another operating system and run the binary. The page says esbuild installs a platform-specific executable. The esbuild-wasm package is the fallback when no native build exists.

What does the FAQ say it will not do?

The FAQ calls the project a late-stage beta. It has not hit version 1.0. Code splitting is described as pretty primitive. The author says they are not doing active feature development at the moment, and are still shipping releases.

Features the FAQ says are not planned for core include other UI languages such as Elm, Svelte, Vue, and Angular, TypeScript type checking, a custom AST API, hot-module reloading, and module federation. Type checking is explicitly “just run tsc separately.”

The page says Vite used esbuild to transform TypeScript into JavaScript for quite a while, and that Amazon CDK and Phoenix use it to bundle. It also says there is one main developer, and that you should pin the version if the build has to stay stable. The chart is a single published setup. It is not a promise about your repository.

Frequently asked questions

What is esbuild used for?

The project homepage calls esbuild a bundler for the web. It lists JavaScript, CSS, TypeScript, and JSX as built in, plus CSS modules, tree shaking, minification, and source maps. It also lists a local server, watch mode, and plugins. The API is available from the command line, from JavaScript, and from Go. The getting started page shows a first bundle that turns a JSX file and React into one outfile the page says no longer depends on node_modules.

Does esbuild type-check TypeScript?

The FAQ says type checking is not a feature the author plans to put in esbuild's core. The instruction on that page is to run tsc separately. esbuild does parse TypeScript with its own parser and can transform it to JavaScript. The FAQ contrasts that parser with the official TypeScript compiler, which the page says still appears to run the type checker even when type checking is disabled. A green esbuild run is not a type-check result.

Why does the site say the bundler is fast?

The FAQ gives four reasons: it is written in Go and compiles to native code, it uses parallelism heavily, the whole tool is written from scratch, and it tries to touch memory less often. The homepage chart is the numbered comparison: 0.39 seconds for esbuild on that three.js bundle, versus 14.91, 34.10, and 41.21 seconds for the other three tools named there. Those times are the page's, for default settings with minification and source maps.

Is esbuild version 1.0?

The FAQ calls esbuild a late-stage beta and says it has not yet hit version 1.0. It also says code splitting is still pretty primitive, and that the API is used by other tools even so. Patch versions are described as backwards-compatible changes, and minor versions as backwards-incompatible ones. The page suggests pinning an exact version, or pinning the major and minor versions, if you use it for something real. The getting started install uses npm with --save-exact.

Should you install the WebAssembly build?

The getting started page says the native package is the recommended install. The esbuild-wasm package works the same way on every platform, and the page says it can sometimes be 10 times slower than the native package. It also says the WebAssembly build is often an order of magnitude slower, is single-threaded, and leaves out the local file server. Use it when the platform has no native binary. The same page says skipping Yarn's command-line wrapper can result in esbuild running 10 times faster.

Sources