gdborton / webpack-parallel-uglify-plugin

A faster uglifyjs plugin.
466 stars 34 forks source link

Bump uglify-js and uglify-es versions to fix Uglify bugs #60

Closed etripier closed 5 years ago

etripier commented 5 years ago

We need to bump the version of uglify_js in this package in order to fix a bug with UglifyJS when the reduce_funcs compress option is used.

Any version below ~3.4 produces the following minified code for https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js when -c reduce_funcs=false:

var r,
  n = function(t, e) {
    if (!lt.TypeIsObject(t) || !hM._es6map)
      throw new TypeError(
        'Method Map.prototype.' + e + ' called on incompatible receiver ' + lt.ToString(t),
      );
  };

hM here is an invalid reference.

The latest version, 3.6.0, produces the following code:

var r,
  n = function(t, e) {
    if (
      !ct.TypeIsObject(t) ||
      !(function(t) {
        return !!t._es6map;
      })(t)
    )
      throw new TypeError(
        'Method Map.prototype.' + e + ' called on incompatible receiver ' + ct.ToString(t),
      );
  };

This code is valid.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 96.732% when pulling aadbe96aec6ece903e9deca2a4ee912439a3bf69 on etripier:etripier--bump-dependencies into f4623adab54a137aff3086abec6b889f5118ea00 on gdborton:master.