# Feature catalog — evanw/esbuild

> Canonical page: https://codevetter.com/unpack/esbuild/feature-catalog

# Feature catalog — evanw/esbuild

Scanned commit f6058f8364fe7ab91ca57a83e02577ed74c9cae4 (2026-08-09). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

User-facing features are the CLI flag set, the Go and JavaScript build/transform/context APIs, plugins, a local HTTP dev server, polling watch mode, and packaging for many OS/CPU targets plus WASM. Loaders cover JS, JSX, TS, TSX, CSS (including CSS modules), JSON, and several asset loaders. React appears only as a test dependency in scripts/package.json, not as a product UI.
- CLI help in main.go documents --bundle, --define:K=V, --external:M, --format=iife|cjs|esm, --loader, --minify, --outdir/--outfile, --packages, --platform=browser|node|neutral, --serve, --sourcemap, --splitting, --target, and --watch / --watch=forever. — [cmd/esbuild/main.go#L33-L56](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/main.go#L33-L56)
- The same help lists loaders base64, binary, copy, css, dataurl, empty, file, global-css, js, json, jsx, local-css, text, ts, and tsx. Default extension mapping in bundler.go assigns .js/.mjs/.cjs to JS, .jsx to JSX, and .json to JSON. — [cmd/esbuild/main.go#L40-L43](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/main.go#L40-L43) [internal/bundler/bundler.go#L2956-L2967](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/bundler/bundler.go#L2956-L2967)
- Advanced CLI flags include --analyze, --banner/--footer, --certfile/--keyfile, --drop, --jsx and --jsx-import-source (default react), --mangle-props, --metafile, --minify-whitespace/identifiers/syntax, --pure, --supported, --tree-shaking, --tsconfig, and --tsconfig-raw. — [cmd/esbuild/main.go#L58-L135](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/main.go#L58-L135)
- pkg/api.BuildOptions-style operations are Build (one-shot), Transform (string in, code/map/legal comments out), and Context for repeated Rebuild, Watch, and Serve. Plugin hooks are Setup plus OnStart, OnEnd, OnResolve, OnLoad, and OnDispose. — [pkg/api/api.go#L398-L416](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/api.go#L398-L416) [pkg/api/api.go#L487-L543](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/api.go#L487-L543) [pkg/api/api.go#L575-L600](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/api.go#L575-L600)
- lib/npm/node.ts exports build, context, transform, formatMessages, analyzeMetafile, and the sync twins buildSync, transformSync, and formatMessagesSync. Sync calls prefer a worker_threads service unless ESBUILD_WORKER_THREADS is 0 or the thread is already the internal worker. — [lib/npm/node.ts#L23-L49](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/lib/npm/node.ts#L23-L49) [lib/npm/node.ts#L135-L187](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/lib/npm/node.ts#L135-L187)
- The service protocol commands handled in service.go are build, transform, resolve, rebuild, watch, serve, cancel, dispose, error, format-msgs, and analyze-metafile. Resolve kinds encoded later include entry-point, import-statement, require-call, dynamic-import, require-resolve, import-rule, composes-from, and url-token. — [cmd/esbuild/service.go#L227-L244](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/service.go#L227-L244) [cmd/esbuild/service.go#L360-L361](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/service.go#L360-L361) [cmd/esbuild/service.go#L547-L571](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/service.go#L547-L571) [cmd/esbuild/service.go#L828-L846](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/cmd/esbuild/service.go#L828-L846)
- Serve mode is a local HTTP server. It overlays in-memory build outputs on servedir, serves index.html or a generated directory listing, and special-cases GET /esbuild with Accept text/event-stream. HTTPS requires both keyfile and certfile. CORS origins support a single * wildcard. — [pkg/api/serve_other.go#L1-L14](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/serve_other.go#L1-L14) [pkg/api/serve_other.go#L105-L169](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/serve_other.go#L105-L169) [pkg/api/serve_other.go#L747-L788](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/serve_other.go#L747-L788)
- Watch mode is a polling scanner, not fsnotify and not cgo. It sleeps 100ms, checks up to 16 recent paths every tick plus at least 64 other paths, and aims to scan a large project about every 2 seconds. — [pkg/api/watcher.go#L1-L48](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/watcher.go#L1-L48)
- When bundling, an unspecified format becomes IIFE for platform browser, CommonJS for node, and ESM for neutral. --splitting is rejected unless the output format is ESM. external and alias are rejected unless bundle is set. — [pkg/api/api_impl.go#L1413-L1447](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/pkg/api/api_impl.go#L1413-L1447)
- Yarn PnP resolution is implemented in internal/resolver/yarnpnp.go against the Yarn PnP spec (package registry, fallback pool, ignore pattern). Zip contents are read through internal/fs/fs_zip.go. — [internal/resolver/yarnpnp.go#L1-L49](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/resolver/yarnpnp.go#L1-L49) [internal/fs/fs_zip.go#L1-L18](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/fs/fs_zip.go#L1-L18)
- The JS API locates a platform binary via knownWindowsPackages, knownUnixlikePackages, and knownWebAssemblyFallbackPackages (android arm, android x64, and openharmony arm64 are WASM fallbacks). ESBUILD_BINARY_PATH overrides the path, except the hard-coded ignore of /usr/bin/esbuild. — [lib/npm/node-platform.ts#L7-L83](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/lib/npm/node-platform.ts#L7-L83) [lib/npm/node-platform.ts#L116-L128](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/lib/npm/node-platform.ts#L116-L128)
- scripts/package.json depends on react 17.0.1, typescript 4.7.4, source-map, and unicode data. Those are test/tooling dependencies. The product itself has no React UI; JSX support defaults the factory to React.createElement. — [scripts/package.json#L1-L11](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/scripts/package.json#L1-L11) [internal/js_parser/js_parser.go#L17810-L17813](https://github.com/evanw/esbuild/blob/f6058f8364fe7ab91ca57a83e02577ed74c9cae4/internal/js_parser/js_parser.go#L17810-L17813)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
