Created
March 9, 2016 21:23
-
-
Save irae/2850090bfe672a857faf to your computer and use it in GitHub Desktop.
require('react') and Browsefiry versus CDN React sizes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you might need to: | |
# npm install -g browserify | |
# npm install envify uglifyify [email protected] [email protected] | |
REACT=$(curl -L --silent https://fb.me/react-0.14.7.min.js) | |
REACTDOM=$(curl -L --silent https://fb.me/react-dom-0.14.7.min.js) | |
echo "React from CDN not gziped" | |
echo "$REACT $REACTDOM" | wc -c | |
echo "React from CDN gzip" | |
echo "$REACT $REACTDOM" | gzip -c | wc -c | |
REACTBUILD=$(NODE_ENV=production browserify -g envify -g uglifyify -r react -r react-dom) | |
echo "React manual build not gziped" | |
echo "$REACTBUILD" | wc -c | |
echo "React manual build gzip" | |
echo "$REACTBUILD" | gzip -c | wc -c | |
# Results as of March 9th 2016 | |
# React from CDN not gziped | |
# 136289 | |
# React from CDN gzip | |
# 39881 | |
# React manual build not gziped | |
# 213464 | |
# React manual build gzip | |
# 48278 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment