gruntjs - Using uglify grunt task messes up selectivizr -


i have yeoman project uses grunt-contrib-uglify on javascript files. when run on selectvizr library (pulled in using bower) resultant file looks this:

!function(win){return}(this); 

i think that's because selectivizr setup not if browser isn't ie, perhaps in grunt execution context it's doing that?

so want know if it's possible have uglify run on selectivizr , produce usable?

uglify processes javascript sole purpose of optimization. job make file super small in way possible. this, detects non-variable conditions in code, such if (true) { return; }. since true true, functionality of conditional interpreted, , optimized for.

so, it's not uglify bug, since did job correctly. i'm not familiar trick selectivizr using, if works, works.

unfortunately, solution can think of not letting uglify run on file, , instead copy on dist/ directly.


Comments