4 ms·
How big is React gzipped? How much are you saving with this library?
by rpedela 11y ago
How big is React gzipped? How much are you saving with this library?
- dceddia 11y agoLooks like React 0.14.6 is about 38k gzipped: curl --silent --output /dev/null -H "Accept-Encoding: gzip,deflate" --write-out "size_download=%{size_download}\n" https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.min.js https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.mi... >> size_download=39542
- warfangle 11y agoThat doesn't remove everything behind process.env.NODE_ENV !== 'production' though. Though, you do need webpack/browserify/etc to take advantage of that.
- LaurensBER 11y agoPerhaps even more important, does library size still matter once dead-code elimination is an option in Webpack2? See: https://twitter.com/dan_abramov/status/656970508005736448 https://twitter.com/dan_abramov/status/656970508005736448
- merb 11y agoJust take a look, how many libraries are written in ES6, clearly not much. So dead code Elimination only works if you have ES6 libs and that will take some time.
- pkozlowski_os 11y agoIf you test currently available dead-code elimination tools for JS you will discover that there are tricks that those tools can't play, most important one being eliminating unused methods on object / classes. AFAIK Webpack2 is using Rollup under the hood. While rollup is great and can build smaller outputs (biggest win seems to be elimination of the module system overhead) it can't perform miracles. In short: size still matters, even with dead-code elimination tools (at least as they are today).