release notes
An extremely fast bundler for the web
release notes
Published 6/27/2021
PatchSafe upgradeAdd a target for ES2021
It's now possible to use --target=es2021 to target the newly-released JavaScript version ES2021. The only difference between that and --target=es2020 is that logical assignment operators such as a ||= b are not converted to regular assignment operators such as a || (a = b).
Minify the syntax Infinity to 1 / 0 (#1385)
The --minify-syntax flag (automatically enabled by --minify) will now minify the expression Infinity to 1 / 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 transform property (#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 translate3d to translateZ conversion 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 s such as in [type="a" s] { list-style: lower-alpha; }. Previously doing this caused a warning about unrecognized syntax.
release notes
Published 6/27/2021
PatchSafe upgradeAdd a target for ES2021
It's now possible to use --target=es2021 to target the newly-released JavaScript version ES2021. The only difference between that and --target=es2020 is that logical assignment operators such as a ||= b are not converted to regular assignment operators such as a || (a = b).
Minify the syntax Infinity to 1 / 0 (#1385)
The --minify-syntax flag (automatically enabled by --minify) will now minify the expression Infinity to 1 / 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 transform property (#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 translate3d to translateZ conversion 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 s such as in [type="a" s] { list-style: lower-alpha; }. Previously doing this caused a warning about unrecognized syntax.