# esbuild — card for AI agents

Extremely fast JavaScript and CSS bundler and minifier written in Go.

Category: Build tools and bundlers · npm package `esbuild` · latest version 0.28.2 (checked 2026-11-01)
Install: `npm install esbuild`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Numbers (AgentGid data)
- Gid Score: 84.7 (#42 of all tools, 3 of 185 in its category)
- Used in 310 public projects set up for AI coding agents (5.0%)
- Downloads last week: 443,230,940 (as of 2026-11-24), +41.8% over 4 weeks
- GitHub stars: 40,170 (as of 2026-11-24)
- Last push: 2026-08-09

## Often used with
tsx 50.0%, Vitest 57.1%, TypeScript 89.7%, Vite 41.9%, Playwright (JavaScript) 38.7%, Express 23.9%

## Checked alternatives (same job)
- Vite: https://agentgid.com/tools/vite/agent.md
- SWC: https://agentgid.com/tools/swc-core/agent.md
- webpack: https://agentgid.com/tools/webpack/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/esbuild/
- Homepage: https://github.com/evanw/esbuild#readme
- Repository: https://github.com/evanw/esbuild


## esbuild: pack your site's code into small fast files

esbuild is a free build tool for websites and apps. It joins your many code files into one or a few small files that a browser or server can load. It understands TypeScript, JSX and CSS without setup, and it can shrink files and rebuild them as you save. Many other tools run it inside them.

### Where to use it
- One small script file for a site: Your TypeScript files and the libraries they use become a single small file that the page loads with one script tag.
- Run TypeScript scripts on a server: A small server, bot or cron script written in TypeScript is turned into one plain JavaScript file that Node.js runs directly.
- Page reloads when you save: While you work, the browser page reloads by itself each time you save a file, with no separate dev server to set up.
- A build script your assistant can extend: When the command line gets long, the same build lives in a short JavaScript file that is easy to read and change.
- Code that also runs in older browsers: Newer JavaScript you or your assistant write is rewritten into older forms for the browser versions your visitors use.
- One-file widget for other sites: A chat button or booking form that other site owners add with a single script tag ships as one file with nothing else to install. (idea, not from the official pages)

### How to start
- Install esbuild into the project with the exact version written down.

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

- Bundle your entry file into one output file.

```
./node_modules/.bin/esbuild app.jsx --bundle --outfile=out.js
```

- Save the command as a build script so anyone can run npm run build.

```
{
  "scripts": {
    "build": "esbuild app.jsx --bundle --outfile=out.js"
  }
}
```


### License
Free to use, also in paid and closed-source products, under the MIT license. The files it builds for you are your own code; keep the license notice only if you ship esbuild itself.

### Good to know
- It does not check TypeScript types. Code with a type mistake still builds, so a separate type check has to run as well.
- It is not at version 1.0 yet; its own docs call it a late-stage beta, and changes that can break your build come in minor versions.
- It is mostly built by one main developer, who says new features are paused while fixes and releases continue. Version 0.28.2 came out on 8 August 2026.
- It does not protect you from harmful code. Use it on your own code, not on files strangers upload.
- Vue and Svelte files, type checking and hot swapping of changed parts are left to other tools on purpose.

Checked 2026-11-10 against: https://esbuild.github.io/, https://esbuild.github.io/getting-started/, https://esbuild.github.io/api/, https://esbuild.github.io/content-types/, https://esbuild.github.io/faq/, https://github.com/evanw/esbuild/blob/main/CHANGELOG.md, https://github.com/evanw/esbuild/blob/main/LICENSE.md, https://registry.npmjs.org/esbuild, https://registry.npmjs.org/esbuild/0.28.2

### Mistakes to avoid
- Don't: Moving from esbuild 0.28.x to 0.29.x as if it were a routine patch update → Do: Pin the exact version (npm install --save-exact esbuild) and read the changelog before a minor-version bump (Before 1.0, esbuild puts changes that can break builds into minor versions.)
- Don't: Treating a successful esbuild run as proof the TypeScript is correct → Do: Run tsc --noEmit (in CI or next to watch mode) as a separate step (esbuild strips types without checking them; in our run const n: number = "not a number" built with exit code 0.)
- Don't: Bundling server code with the default browser settings → Do: Add --platform=node so fs, path and other built-in modules stay outside the bundle (The default target is the browser; the node platform marks Node's own modules as external.)
- Don't: npm install --ignore-scripts --no-optional (both flags) in CI or Docker → Do: Install without those flags, or with at most one of them (esbuild ships its program as an optional package plus an install script; with both turned off it cannot install.)
- Don't: TypeScript settings without isolatedModules → Do: Set "isolatedModules": true in tsconfig.json (esbuild compiles each file alone and cannot tell whether an imported name is a type or a value.)

### Questions
- Can I use it in a paid product? Yes, it is MIT-licensed.
- Does it check my TypeScript for type errors? No. It removes the types and builds; run tsc --noEmit next to it. In our run a file with a wrong type built with exit code 0.
- Can I use it without Node.js? Yes. The command is a native program; you can download the package for your system from the npm registry and unpack it.
- Which version range should I put in package.json? An exact version, or at most the same minor version (~0.28.2), because minor releases may break builds before 1.0.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
