3 ms·
Most/all minifiers won't actually mangle object property names as those often have observable side effects. You want to grab all the keys for an object and do s
by madeofpalk 3y ago
Most/all minifiers won't actually mangle object property names as those often have observable side effects. You want to grab all the keys for an object and do something different depending on the name of the key - you can no longer do that if the minifier has mangled all the object keys. Not to mention I imagine it would be significantly harder track all references to object keys across an application (as opposed to just local variables).
- btown 3y agoAs I recall, the only minifier that went this far was Closure Compiler [0] - the caveats documented there still apply! (Fun fact: I believe that Closure Library, and by extension the Closure Compiler, are still used for the Gmail rich text editor! [1]) [0] https://developers.google.com/closure/compiler/docs/api-tutorial3 https://developers.google.com/closure/compiler/docs/api-tuto... [1] https://google.github.io/closure-library/source/closure/goog/demos/editor/editor.html https://google.github.io/closure-library/source/closure/goog...
- nathell 3y agoAnd ClojureScript.
- deleted 3y ago[deleted]