trullock / NUglify

NUglify is a HTML, JavaScript and CSS minification Library for .NET (fork of AjaxMin + new features)
Other
396 stars 78 forks source link

Different method result after minification #325

Open riccardocarbone77 opened 2 years ago

riccardocarbone77 commented 2 years ago

We use the last version of package (v1.20)

Describe the bug After minify a ES5 javascript transpliller file, the code not working corretly. test.zip

To Reproduce

Minified output or stack trace var MyTest=function(){function MyTest(){}return Object.defineProperty(MyTest.prototype,"AnyDetail",{get:function(){var _b;return!0&&_b!==void 0?_b:!1},enumerable:!1,configurable:!0}),MyTest.prototype.RefreshData=function(data){this.myArray=data},MyTest}();

We tried we another minification tool and the result of the test was true

var MyTestNPMUglify = (function () {
  function t() {}
  return (
    Object.defineProperty(t.prototype, 'AnyDetail', {
      get: function () {
        var t;
        return null !== (t = 0 < (null == (t = this.myArray) ? void 0 : t.length)) && t;
      },
      enumerable: !1,
      configurable: !0
    }),
    (t.prototype.RefreshData = function (t) {
      this.myArray = t;
    }),
    t
  );
})();
Seresam commented 2 years ago

hi, is this issue being investigated?

riccardocarbone77 commented 2 years ago

Hi, not again. 

riccardocarbone77 commented 1 year ago

Hi, do you have news about the problem? Thanks

trullock commented 1 year ago

I'm afraid I have very little time to work on this.

Submitting a PR with a bare minimum test case that replicates the issue would help get this moving