-
Allow
this
with--define
(#1361)You can now override the default value of top-level
this
with the--define
feature. Top-levelthis
defaults to beingundefined
in ECMAScript modules andexports
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
, andborder-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.