Uglify modifies code in minified builds
Colin Clark
colinbdclark at gmail.com
Wed Nov 25 18:55:31 UTC 2015
Hi Antranig,
> On Nov 25, 2015, at 1:48 PM, Antranig Basman <antranig.basman at colorado.edu> wrote:
>
> If we don't have time for this, the 13K savings through disabling the extra optimisations seem neither here nor there - and having code without any whitespace appear in the debugger seems equivalently obstructive to having the optimised version you showed - even if Safari can deal with this, the other browsers can't. I would say that until we're prepared to deploy SOURCE MAPS, we should go with simple concatenation in our builds.
I disagree quite significantly, but I find the discussion very interesting.
Minified builds aren't intended for development. They're designed for production, and we shouldn't be either surprised or terribly concerned by the idea that somehow magically the code changed in layout or structure as a result of minification. That's what it's for!
Shipping Infusion out of the box in a way that doesn't support production deployers is a poor idea, and the toolchain you propose as an alternative is entirely worthwhile but will take some time to get our heads around and use appropriately. We're already behind the times in this regard and there's a lot of catching up and learning to do. In the meantime, let's just stop expecting to be able debug viably within a minified build.
Alternatively, I propose that we simply stop offering builds of Infusion at all, and be explicit about the fact that our users are entirely on their own in this regard. That doesn't sound like an appealing option to me, but hopefully you see my point.
Colin
More information about the fluid-work
mailing list