devpunks / snuggsi

snuggsi ツ - Easy Custom Elements in ~1kB
https://snuggsi.com
MIT License
398 stars 17 forks source link

Fixes #33: Use uglify-es for ES6 copilation #61

Closed snuggs closed 7 years ago

snuggs commented 7 years ago

Fixes #33

https://github.com/mishoo/UglifyJS2/tree/harmony

snuggs commented 7 years ago

@brandondees @tmornini @robcole @RobertChristopher @scottmacdowell @mrbernnz @btakita @janz93 @misscs Shit is starting to get weird. Come to find out we were minifying but not uglifying our bundle. @brandondees remember when you thought it was strange the ES6 was larger? That's why. The .js (application/javascript) IS uglified. .es (application/ecmascript) was being minified but not uglified.

After using https://github.com/mishoo/UglifyJS2/tree/harmony

Not only did we fix the speed problem with google-closure-compiler-js the entire lib bundle is now

~ 1200 OCTETS (1.2Kb) 🎉 👻 😱 snuggsi.min.es.br

Brotli Compressed . @tmornini even the gzip compressed is less than 1 ethernet packet now. Might even have room to bundle the polyfill @brandondees :trollface:

capture d ecran 2017-06-16 a 23 53 55

brandondees commented 7 years ago

room to grow!