esbuild 0.12.10
-
Add a target for ES2021
It's now possible to use
--target=es2021to target the newly-released JavaScript version ES2021. The only difference between that and--target=es2020is that logical assignment operators such asa ||= bare not converted to regular assignment operators such asa || (a = b). -
Minify the syntax
Infinityto1 / 0(#1385)The
--minify-syntaxflag (automatically enabled by--minify) will now minify the expressionInfinityto1 / 0, which uses fewer bytes:// Original code const a = Infinity; // Output with "--minify-syntax" const a = 1 / 0;This change was contributed by @Gusted.
-
Minify syntax in the CSS
transformproperty (#1390)This release includes various size reductions for CSS transform matrix syntax when minification is enabled:
/* Original code */ div { transform: translate3d(0, 0, 10px) scale3d(200%, 200%, 1) rotate3d(0, 0, 1, 45deg); } /* Output with "--minify-syntax" */ div { transform: translateZ(10px) scale(2) rotate(45deg); }The
translate3dtotranslateZconversion was contributed by @steambap. -
Support for the case-sensitive flag in CSS attribute selectors (#1397)
You can now use the case-sensitive CSS attribute selector flag
ssuch as in[type="a" s] { list-style: lower-alpha; }. Previously doing this caused a warning about unrecognized syntax.