Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gzip bundle.js in build process #678

Merged
merged 1 commit into from
Apr 6, 2017
Merged

Gzip bundle.js in build process #678

merged 1 commit into from
Apr 6, 2017

Conversation

jeremiak
Copy link
Contributor

@jeremiak jeremiak commented Apr 5, 2017

To reduce the size of the file we transfer over the network, we want to gzip, at least, the bundle.js file.

Using some middleware that checks for a compressed file (by adding .gz to the requested file name) and serves it if available. Otherwise, serves the static files just like before.

size of bundle.js:

development production
without gzipping 2.3MB 799KB
with gzipping 522KB 249KB

To reduce the size of the file we transfer over the network,
we want to gzip, at least, the javascript bundle.js file.

Using some middleware that checks for a compressed file (by
adding .gz to the requested file name) and serves it if
available. Otherwise, serves the static files just like
before.
@brendansudol
Copy link
Contributor

so so awesome, and all from 19 new lines of code!

@brendansudol brendansudol merged commit aea70d8 into master Apr 6, 2017
@brendansudol brendansudol deleted the jk-gzip-bundle branch April 6, 2017 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants