@esbuild/linux-arm64
0.28.2 · 8 Aug 2026MIT44.7M / weekRepositoryHomepagenpmAtom feed
0.28.2 is the newest release of 0.18.x.
In short
1 new1 fixed1 changed
Release note
Add the
--drop-labels=optionIf you want to conditionally disable some development-only code and have it not be present in the final production bundle, right now the most straightforward way of doing this is to use the
--define:flag along with a specially-named global variable. For example, consider the following code:function main() { DEV && doAnExpensiveCheck() }You can build this for development and production like this:
Development:
esbuild --define:DEV=trueProduction:
esbuild --define:DEV=false
One drawback of this approach is that the resulting code crashes if you don't provide a value for
DEVwith--define:. In practice this isn't that big of a problem, and there are also various ways to work around this.However, another approach that avoids this drawback is to use JavaScript label statements instead. That's what the
--drop-labels=flag implements. For example, consider the following code:function main() { DEV: doAnExpensiveCheck() }With this release, you can now build this for development and production like this:
Development:
esbuildProduction:
esbuild --drop-labels=DEV
This means that code containing optional development-only checks can now be written such that it's safe to run without any additional configuration. The
--drop-labels=flag takes comma-separated list of multiple label names to drop.Avoid causing
unhandledRejectionduring shutdownAll pending esbuild JavaScript API calls are supposed to fail if esbuild's underlying child process is unexpectedly terminated. This can happen if
SIGINTis sent to the parentnodeprocess with Ctrl+C, for example. Previously doing this could also cause an unhandled promise rejection when esbuild attempted to communicate this failure to its own child process that no longer exists. This release now swallows this communication failure, which should prevent this internal unhandled promise rejection. This change means that you can now use esbuild's JavaScript API with a customSIGINThandler that extends the lifetime of thenodeprocess without esbuild's internals causing an early exit due to an unhandled promise rejection.Update browser compatibility table scripts
The scripts that esbuild uses to compile its internal browser compatibility table have been overhauled. Briefly:
Converted from JavaScript to TypeScript
Fixed some bugs that resulted in small changes to the table
Added
caniuse-liteand@mdn/browser-compat-dataas new data sources (replacing manually-copied information)
This change means it's now much easier to keep esbuild's internal compatibility tables up to date. You can review the table changes here if you need to debug something about this change:
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.