You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varu=require('uglify-js');varast=u.parse('var a = "string" === "string"');ast.figure_out_scope();ast.transform(u.Compressor({// should be defaults, but just in case...booleans: true,conditionals: true,comparisons: true}));console.log(ast.print_to_string());
I would expect that this would result in the following code:
vara=!0;
It instead generates the following code:
vara=true;
This conversion occurs just fine separately, meaning that if I used var a=true; as my source code, it would compress to var a=!0;. It just seems as though nodes are not being re-evaluated after manipulation in some cases. It's also worth noting that this compression worked as expected in uglify-js v1.
The text was updated successfully, but these errors were encountered:
Node 0.8.17, uglify-js 2.2.5
I would expect that this would result in the following code:
It instead generates the following code:
This conversion occurs just fine separately, meaning that if I used
var a=true;
as my source code, it would compress tovar a=!0;
. It just seems as though nodes are not being re-evaluated after manipulation in some cases. It's also worth noting that this compression worked as expected in uglify-js v1.The text was updated successfully, but these errors were encountered: