Open mattdesl opened 7 years ago
It would be great if we all start playing with this on our current projects running local tests or give them a try on some already developed projects, but I'm really looking forward to add most of this stuff.
I'm really ashamed of the bundle size we are delivering currently, so let me know if you need any help testing all these @mattdesl.
Also a side note, I remember mentioning react-optimize
preset in one of my talks about React performance and honestly didn't notice any bundle size reduction or speed improvement.
There's some useful stuff we could add to the bundle options for browserify. This would have to be passed to
dev.js
andrelease.js
.https://github.com/Jam3/prj-gout/blob/master/scripts/bundleOptions.js
envify
can be run globally in prod — bundle time slows down a bit, but it can remove some code in your dependencies & node_modulesassert
requires in production, as well as any modules associated with it that aren't used elsewhere in your bundledead_code
. On the final Gout bundle we can save 230kb with this transform compared to UglifyJSdead_code
. 😱 It slows down build time, though.disc
to visualize the bundle bloat/size. See here on Gout.