Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Estimate production size of npm front-end package
$ npm i -g browserify uglify-js pretty-bytes
$ npm i react
$ browserify node_modules/react | uglifyjs -m | gzip | wc -c | pretty-bytes
> 51.58 kB
$ npm i backbone jquery
$ browserify node_modules/backbone | uglifyjs -m | gzip | wc -c | pretty-bytes
> 41.99 kB
$ npm i socket.io-client
$ browserify node_modules/socket.io-client | uglifyjs -m | gzip | wc -c | pretty-bytes
> 20.64 kB
$ npm i treo
$ browserify node_modules/treo | uglifyjs -m | gzip | wc -c | pretty-bytes
> 2.8 kB
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.