Use it when you can own the build script
Our esbuild source build succeeded in 22 seconds, and its Go test step recorded 16 passes with no failures in 13 seconds. Use it if you want direct control of JavaScript or TypeScript bundling. Skip it if your replacement must also provide TypeScript type checking, built-in hot-module reloading, or unrestricted compiler plugins: the maintainer explicitly excludes those jobs from esbuild's core.
That makes the adoption question fairly concrete. Can your application become ordinary JavaScript and CSS through esbuild's existing features, plus a script you are willing to maintain? If so, it deserves a look. If the script grows into a collection of compatibility patches, choose a tool that already owns that integration work.
What people use esbuild for
Developers have used esbuild for server APIs, React builds and browser-based bundling tools, with custom integration around the bundler.
| Who used it | What they did | What came out |
|---|---|---|
| Scott at Level Up Tutorials | Bundled a production server-side API with a custom script, watch mode and a GraphQL plugin | In his video, Scott reports using it in production for over a year and consistently finding it fast. His account describes a maintained script, rather than a turnkey application setup. |
| theGlitchedSide on r/learnjavascript | Arranged separate frontend and backend builds for a React server-side setup | The commenter reports easy configuration and rapid builds, while needing a Node.js wrapper around esbuild's limits. The October 2026 thread makes that extra work explicit. |
| hardfist on GitHub | Built an online bundler with esbuild-wasm and plugins | The reported REPL supported unpkg imports, HTTP imports and files in memory; the site itself used esbuild. Issue #797 links the implementation. |
| okikio on GitHub | Built bundle.js.org after seeing hardfist's project | The tool bundled JavaScript and reported the final bundle size, according to okikio's comment. |
Scott's use is the clearest model for adopting esbuild directly: a specific bundling job, an explicit build script and a plugin for the application's unusual input. The browser projects show a different use. There, esbuild is an engine inside a tool someone else must build.
A deleted-account commenter in r/programming also reported a large improvement after replacing Rollup on a small side project in 2021. That's a reason to measure your own project, not a transferable speed guarantee. Keep the project's benchmark, historical user reports and our source-build results separate.
What happened when we ran it
Our November 24 source-checkout run at f6058f8 completed installation in 1 second, built successfully in 22 seconds and recorded 16 passing Go tests, zero failures, in 13 seconds.
| Source-checkout step | Recorded result |
|---|---|
| Install | Succeeded in 1 second; 2 dependencies recorded |
| Build | Succeeded in 22 seconds |
| Tests | Succeeded in 13 seconds; Go test summary: 16 passed, 0 failed of 16 |
Our harness recorded a configuration of 3 CPUs, 8 GB RAM and image golang:1.24-bookworm. The checkout contained 348 files, about 193,040 source lines and occupied 9.5 MB. The scan found four CI workflow files, no Dockerfile and no directory named tests. Passing Go tests are a useful reminder that a particular directory name isn't a test-coverage measure. The image label is configuration information; actual runtime versions require the raw toolchain logs.
A separate quickstart run on November 24 used commit f6058f8364fe in a fresh unprivileged container configured with 2 CPUs and 4 GB RAM, without published ports or secrets. It followed a different recipe from the source-checkout harness above.
First, the clone step completed. The recipe then ran go install github.com/evanw/esbuild/...@latest, so that installation command selected the latest package rather than compiling the pinned checkout. The executable returned version 0.28.2 with exit 0, and esbuild --help returned exit 0 with entry-point and bundle options.
Then the recipe stopped. The usage step recorded: "FAILED; no runnable esbuild command in the README's usage/examples sections". The README sends readers to a separate getting-started guide, which does contain a first-bundle example. This failure identifies where the automated README recipe ran out of instructions. It isn't an application bundle that failed to compile.
Where people get stuck: output can compile and still fail in Node
The author of issue #1921 generated an ESM bundle, ran node index.mjs, and got Dynamic require of "os" is not supported.
ESM is JavaScript's standard import/export module format; CommonJS uses require. The issue concerns dependencies that still require Node's built-in modules when emitted inside ESM output. This is more specific than saying CommonJS doesn't work with esbuild. Hacker News user mikojan reports using esbuild with CommonJS at work without problems.
In #1921, benmccann linked the problem to Netlify's ESM migration and Shopify's move away from CommonJS. ShivamJoker reported the related Dynamic require of "crypto" is not supported error on AWS Lambda. These are attributed runtime reports, not failures from our sandbox. The thread offers a rewriting script limited to non-minified output and links a proposed change; the issue is open in the captured discussion. A proposed change isn't a shipped fix.
For a server migration, run the emitted entry point in the deployment runtime before treating a successful bundle as a release candidate. Exercise the dependencies that import Node built-ins. A frontend-only success won't answer that question.
The fix depends on which layer broke
Copying node_modules between platforms can install the wrong native executable, and the getting-started guide tells you to reinstall on the destination platform.
| Symptom or requirement | What the discussion establishes | Practical route |
|---|---|---|
| Missing native executable after moving dependencies | The official guide explains that esbuild needs a platform-specific binary. | Reinstall on the destination OS and architecture. Yarn's supportedArchitectures can cover several platforms. |
| Concurrent pnpm installs leave projects unable to load esbuild | In pnpm #15568, wagenet reports postinstall scripts racing in one shared global virtual-store slot. The issue was closed as completed with build-serialization work. | The reporter says pnpm install --force repaired affected projects. Check pnpm's fix history rather than assuming a bundler defect. |
| A worker constructor doesn't create a worker bundle automatically | In esbuild #312, Evan Wallace suggests adding the worker as another entry point. The automatic-worker request is open. | Build and ship that entry point deliberately, or evaluate a worker plugin. |
| A plugin won't run through the synchronous JavaScript API | The API documentation says plugins are asynchronous. | Use the asynchronous build API. |
The pnpm report is especially easy to misdiagnose. Some installs returned success, but another concurrent install removed the shared slot and broke the projects already linked to it. The package name in an error can identify the victim rather than the faulty layer. The discussion supplies a repair command and completed work, but no reliable minimum fixed pnpm release to recommend here.
Avoid the worker shortcut that turns a function into a string and puts it inside a Blob. In #312, Wallace explains that a transformed function can reference helpers defined elsewhere in the bundle. Stringifying only the function loses that context.
TypeScript emission leaves type checking to tsc
esbuild transforms TypeScript to JavaScript without checking types; the FAQ explicitly tells you to run tsc separately.
Keep a command such as tsc --noEmit as a separate release check if type errors must block deployment. Treat emitted JavaScript as the output of a transformation step, not an assurance that your program's types agree.
Older browser requirements need their own decision. In issue #297, Wallace explains that targeting es5 can keep existing ES5 code from acquiring newer syntax during minification without supplying full ES6-to-ES5 translation. The issue is closed, but that explanation doesn't promise a complete legacy-browser compiler.
Hacker News user jannes described compiling with TypeScript first and bundling the resulting ES5 files with esbuild in February 2021. That's a useful division of responsibilities, not a recommendation to copy that old build script unchanged. In #297, HugoDF reports using SWC successfully for ES5 transpilation. Your required syntax and runtime determine which transformation step belongs before bundling.
CSS Modules, font files and browser bundling are different jobs
The upstream README lists built-in CSS Modules support, while issue #20 distinguishes local class-name exports from imports that return a CSSStyleSheet object.
If you use Shadow DOM, where styles attach to a component's shadow root, ask for the latter behavior explicitly. A feature named CSS Modules doesn't answer whether an import returns an object you can attach to that root. Wallace suggests exploring a plugin for the CSSStyleSheet use case in the closed thread.
For esbuild font handling, Wallace says in #20 that existing file and dataurl loaders should cover font resources just as they cover other binary assets. Choose between a separate emitted asset and an embedded data URL according to your delivery needs. That comment isn't a font-loading performance test.
esbuild-wasm puts the bundler in a browser, as the working projects in #797 demonstrate. The same thread records zaydek opening a REPL through file:// and getting a fetch error that required HTTP or HTTPS. Serving it through a local HTTP server worked.
The browser tradeoff goes beyond getting it to open. Curran complained about a historical 9 MB wasm build; Wallace replied that a compact, optimal in-browser bundling experience was outside the project's goal. Don't turn that historical download into the current package size. The official getting-started guide also warns that the wasm package carries an execution-performance cost compared with native esbuild.
esbuild vs webpack, Vite, Rollup and tsc
Choose esbuild for a custom bundling pipeline, Vite for an integrated application workflow, and keep tsc when you need TypeScript checking.
| Comparison | What should drive your choice |
|---|---|
| esbuild vs webpack | Keep webpack when its existing loaders or plugins do necessary work. Its README documents preprocessing through loaders and a plugin interface. In the r/learnjavascript discussion, Miserable-Money642 recommends comparing the actual application before paying migration costs. |
| esbuild vs Vite | Vite's current README documents a dev server with hot-module replacement and a production build using Rolldown. Pick it when you want those application conventions supplied together. Use esbuild directly when you want to own the surrounding script. |
| esbuild vs Rollup | Rollup's README documents ES-module workflows and legacy module output. Compare the output formats and integration your library needs. A historical user's faster esbuild build doesn't decide output quality for your library. |
| esbuild vs tsc | The esbuild FAQ assigns type checking to tsc. For TypeScript teams these tools can occupy different steps in the same pipeline. |
| esbuild vs SWC or Babel | In #111, Wallace declines to expose esbuild's internal syntax tree to plugins because of correctness risks. Retain an external transformation step when a required compiler plugin needs that access. |
FixDevs also presents Rspack as an option for keeping webpack configuration. Treat that as a candidate to investigate, rather than a migration result. For simply running TypeScript, housecor's X post prefers Bun or tsx. That preference concerns the run-and-watch workflow, not bundler output or a head-to-head speed test.
Maintenance means keeping a deliberately small scope
The maintainer describes esbuild as a late-stage beta that has not reached 1.0, with paused feature development and continuing maintenance and periodic releases in the official FAQ.
That description matters more than treating every unanswered feature request as neglect. The same FAQ calls code splitting primitive and identifies improving it as the primary outstanding feature. Issue #16 records experimental support and later improvements while remaining open. Read the progression: an open feature thread doesn't mean the feature never shipped.
The FAQ also says there is one main developer and recommends pinning an exact version or the major and minor versions. If your organization requires a broadly staffed maintainer team, that staffing model is a concrete procurement concern. Don't adopt it on the assumption that every missing framework feature will eventually move into the core.
Security claims need more than a scanner landing page
The SandboxScanner page for esbuild displays "Scanning esbuild...", rather than completed findings.
It cannot earn esbuild a clean security verdict. Nor does a passing Go test run answer whether a build plugin is trustworthy. When selecting a plugin for Sass, GraphQL or remote module loading, include that plugin in your dependency review. Hardfist's browser bundler, for example, adds its remote-loading behavior through plugins; that isn't evidence that every esbuild installation fetches arbitrary remote modules.
What the other reviews get wrong
Nice Pick's esbuild-versus-Vite page says esbuild lacks a built-in development server, but the official API describes serve mode starting a local development server.
Watch and serve exist. Built-in hot-module reloading is a separate matter, explicitly excluded from the FAQ's core scope. Conflating them makes the comparison less useful.
FixDevs' troubleshooting page says CSS Modules are not native. The upstream README now lists them. Issue #20's discussion about CSSStyleSheet imports is a different request, so it doesn't rescue the blanket claim.
MakerStack's esbuild review describes a single-pass architecture. The official FAQ describes three traversals of the JavaScript syntax tree. Efficiently combining work within those passes is more precise than calling it one pass.
MakerStack and Nice Pick also describe Vite's esbuild relationship without a version qualifier. The current Vite README names Rolldown for its build command, so read older explanations as descriptions of particular Vite versions. Nice Pick's blanket ES2020+ browser claim is also a poor substitute for the official guide's explicit target configuration.
Older repository descriptions need dates too. The progrium fork says esbuild hasn't been used in production and tells TypeScript users to compile first. Scott's production account and the official transform API contradict those as present-day claims. The learning-esbuild repository expressly dates its proof-of-concept description to when it was written. Features advertised by the prantlf fork also need to stay attached to that fork, rather than being credited to evanw/esbuild.
Questions people ask
esbuild bundles JavaScript and CSS and transforms TypeScript and JSX, with command-line, JavaScript and Go interfaces documented by the upstream project.
What is esbuild, and what does it do?
It prepares source code for distribution by bundling modules, transforming supported syntax and optionally minifying output. Its API guide distinguishes a build across files from a transform of one code string.
Why is esbuild so fast?
The maintainer credits native Go code, parallel work, shared data structures and efficient memory use in the FAQ. Those explain the design; they don't promise a particular speedup for your code.
Should I migrate an existing webpack project to esbuild?
Consider it when bundling is a bounded job and you can replace the specific integrations you use. Miserable-Money642's migration advice is to compare cold starts, rebuilds, production output and asset handling on the actual project before switching.
How do esbuild and Vite differ, and should I use esbuild directly?
Use esbuild directly for a script you control. Choose Vite when you want its dev server, hot-module replacement and application build workflow, which its README documents together.
How do I install esbuild with npm and create my first bundle?
The official guide starts with npm install --save-exact --save-dev esbuild and a local executable version check. Its first-bundle example installs React and React DOM, creates app.jsx, then runs ./node_modules/.bin/esbuild app.jsx --bundle --outfile=out.js on Unix. Follow that example's input file and dependencies together.
What is the latest esbuild version, and where is its GitHub repository?
GitHub listed v0.28.2 as the latest release on November 24, 2026. The upstream repository is evanw/esbuild. Our separate quickstart also returned 0.28.2; its version command describes the executable selected by the latest-package installation.
What is esbuild.exe?
It is the Windows form of esbuild's native executable. The getting-started guide provides Windows executable commands. Its presence in a dependency installation is a build-tool detail, not by itself a malware finding.
How does Angular use esbuild?
Angular's official account announced Tailwind support across supported stylesheet languages in its Angular 16.1 esbuild builder. That dated integration report doesn't mean esbuild core compiles Angular applications by itself.
How do I bundle font files with esbuild?
In #20, Wallace points to file and dataurl loaders for fonts. Use a loader appropriate to whether you want a separate asset or embedded content.
How does esbuild compare with Rolldown?
Rolldown appears in Vite's current production-build description; esbuild exposes its own bundling APIs. That distinguishes their roles in this comparison. Our testing limits below explain why this review names no performance winner.
Can esbuild replace tsc?
It can perform the TypeScript-to-JavaScript transformation step, but the FAQ leaves type checking to tsc. Keep the checker if type errors must stop a release.
Should I choose esbuild or Rollup?
Choose by the module output and integrations you need. Rollup documents ES-module and legacy output workflows; esbuild is worth comparing when a small, explicit build script covers your requirements.
What we have not tested yet
Our source-checkout harness passed, and our quickstart reached version and help output, but neither run produced a measured application bundle for this review. The source harness's compiler and operating-system versions require raw toolchain logs; its image label cannot settle them.
We have not tested a webpack migration, incremental rebuilds, output-size parity, advanced code splitting, a Lambda deployment, a worker plugin, Shadow DOM stylesheets, font delivery or a browser wasm bundle. We did not reproduce the community's speed reports, pnpm race or Node ESM error. Our separate quickstart installed the latest Go package, so its executable version isn't proof of a binary built from the pinned source checkout.
There is no measured esbuild-versus-Rolldown or esbuild-versus-Rsbuild result here, no side-by-side test of the other alternatives, and no completed vulnerability audit. The scanner placeholder supplies no advisory count. For an adoption decision, the next useful result is your application's emitted bundle running in its intended runtime, with type checking still able to block a bad release.


