tv4
tv4 copied to clipboard
Minified version and method names
The minifier doesn't shrink property/method names, even if those names are never accessible to the outside world.
From a rough inspection, if we replaced the validate*
, createError
and prefixWith
methods along with the scanned*
properties with single-character substitutions, we'd shave 5% (~1.4kb) off the minified version.
Is there a way to do this without screwing up the source-map, and would it be worth the hassle or not?
We use grunt-contrib-uglify so I'm pretty sure a lot can be done. If not then any other grunt plugin will do (so many choices).
I don't think the alternative can read source-map's and mangle them together wile minifying like uglify does. But then, not sure if that is really needed; I guess debugging works better with the non-minified version.