Registry / http-networking / esbuild

esbuild

JSON →
library0.1.2jsnpmunverified

esbuild is an extremely fast JavaScript and CSS bundler and minifier. The current stable version is v0.28.0. The project maintains an active release schedule, frequently delivering patch updates and minor versions (e.g., v0.27.x, v0.28.x) within short periods, sometimes multiple per month, indicating rapid development and responsiveness to issues.

npm install esbuild
INSTALL
IMPORT
SIG · ESBUILD
E
esbuild
http-networkingjavascriptv0.1.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

build
import { build } from 'esbuild'

Bundles a TypeScript file `src/index.ts` into `dist/bundle.js` for a Node.js environment, targeting ES2022.

import { build } from 'esbuild'; const entryPoint = 'src/index.ts'; const outFile = 'dist/bundle.js'; await build({ entryPoints: [entryPoint], bundle: true, outfile: outFile, platform: 'node', target: 'es2022' }).then(() => { console.log(`Successfully bundled ${entryPoint} to ${outFile}`); }).catch(() => { process.exit(1); });
esbuild --version
Debug
Known issues
breakingesbuild v0.27.0 introduced deliberate backwards-incompatible changes. Users are strongly advised to pin exact versions or use patch-only version ranges to prevent unexpected upgrades.
fix
Pin `esbuild` to an exact version (e.g., `"esbuild": "0.28.0"`) or use `~` for patch updates only (e.g., `"esbuild": "~0.28.0"`) in `package.json`.
affects: >=0.27.0
gotchaPrior to v0.27.7, esbuild might incorrectly generate class fields for TypeScript parameter properties in target environments that don't support them, leading to runtime errors.
fix
Upgrade to `esbuild@0.27.7` or later.
affects: 0.27.0 - 0.27.6
gotchaesbuild versions from 0.25.11 to 0.27.3 had a regression in CSS media query parsing, specifically failing to correctly wrap `or` clauses with parentheses, resulting in malformed CSS output.
fix
Upgrade to `esbuild@0.27.4` or later.
affects: 0.25.11 - 0.27.3
gotchaesbuild v0.25.11 introduced a minification regression where duplicate CSS media rules were not correctly removed, especially for rules with `<media-type> and <media-condition-without-or>` grammar.
fix
Upgrade to `esbuild@0.25.12` or later.
affects: 0.25.11
Errors
Common errors & fixes
SyntaxError: Class field initializers are not supported by the current target environment
TypeScript parameter properties were incorrectly lowered for target environments that don't support class fields in esbuild versions 0.27.0-0.27.6.
fix
Upgrade esbuild to version `0.27.7` or newer.
[ERROR] Expected "and", "or", or end of input but found "{"
A regression in esbuild (v0.25.11 - v0.27.3) caused incorrect parsing of CSS media queries with `or` clauses, leading to invalid CSS.
fix
Upgrade esbuild to version `0.27.4` or newer.
ReferenceError: [variable_name] is not defined
A bug in the bundler (prior to v0.27.1) incorrectly handled `var` declarations nested inside `if` statements when importing ES modules via `require`, leading to hoisting issues.
fix
Upgrade esbuild to version `0.27.1` or newer.
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
2
Resources
esbuild — npm install esbuild · libregistry