Why JS compress result is difference by msbuild task and ajaxmin.exe

Oct 29, 2012 at 1:20 PM

I have a code like below:

  function a(){

this.isEmptyObject = function (obj) {
        for (var name in obj) {
            return false;
        return true;


I compress it by ajaxmin.exe in command line,I got the result below:

function a(){this.isEmptyObject=function(n){for(var t in n)return!1;return!0}}

I compress it by msbuild task ,I got the result below:

function a(){this.isEmptyObject=function(n){for(in n)return!1;return!0}}

It can't be run in browser! does  any parameter I need to set in msbuild task?

Oct 29, 2012 at 5:15 PM

I have a fix ready for the bug; I'll make another release later today.

I don't know why the EXE and the Build Task produce different output; maybe you are using different switches for the two? I can't really tell without know the switches you are passing to the EXE and the switches/properties you are setting on the Task.

Oct 29, 2012 at 7:07 PM

FYI: just released the fix to the minification issue you were seeing, release 4.73.