release notes
release notes
Published 6/16/2021
PatchSafe upgradeAllow this with --define (#1361)
You can now override the default value of top-level this with the --define feature. Top-level this defaults to being undefined in ECMAScript modules and exports in CommonJS modules. For example:
// Original code
((obj) => {
...
})(this);
// Output with "--define:this=window"
((obj) => {
...
})(window);
Note that overriding what top-level this is will likely break code that uses it correctly. So this new feature is only useful in certain cases.
Fix CSS minification issue with !important and duplicate declarations (#1372)
Previously CSS with duplicate declarations for the same property where the first one was marked with !important was sometimes minified incorrectly. For example:
.selector {
padding: 10px !important;
padding: 0;
}
This was incorrectly minified as .selector{padding:0}. The bug affected three properties: padding, margin, and border-radius. With this release, this code will now be minified as .selector{padding:10px!important;padding:0} instead which means there is no longer a difference between minified and non-minified code in this case.
release notes
Published 6/16/2021
PatchSafe upgradeAllow this with --define (#1361)
You can now override the default value of top-level this with the --define feature. Top-level this defaults to being undefined in ECMAScript modules and exports in CommonJS modules. For example:
// Original code
((obj) => {
...
})(this);
// Output with "--define:this=window"
((obj) => {
...
})(window);
Note that overriding what top-level this is will likely break code that uses it correctly. So this new feature is only useful in certain cases.
Fix CSS minification issue with !important and duplicate declarations (#1372)
Previously CSS with duplicate declarations for the same property where the first one was marked with !important was sometimes minified incorrectly. For example:
.selector {
padding: 10px !important;
padding: 0;
}
This was incorrectly minified as .selector{padding:0}. The bug affected three properties: padding, margin, and border-radius. With this release, this code will now be minified as .selector{padding:10px!important;padding:0} instead which means there is no longer a difference between minified and non-minified code in this case.
An extremely fast bundler for the web