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

Display gzipped size for JS and CSS after builds #228

Closed
gaearon opened this issue Jul 26, 2016 · 8 comments · Fixed by #229
Closed

Display gzipped size for JS and CSS after builds #228

gaearon opened this issue Jul 26, 2016 · 8 comments · Fixed by #229

Comments

@gaearon
Copy link
Contributor

gaearon commented Jul 26, 2016

We currently recommend http-server for testing prod builds but it doesn’t gzip.
This might lead you down the path of optimizing the wrong thing in the bundle size.
We should fix our instructions.

@gaearon
Copy link
Contributor Author

gaearon commented Jul 26, 2016

Actually: we should display gzipped build size for JS and CSS assets after compilation.

npm run build should print it. It has access to Webpack stats.

@gaearon gaearon changed the title Recommend a server that gzips for testing Display gzipped size for JS and CSS after builds Jul 26, 2016
@gaearon
Copy link
Contributor Author

gaearon commented Jul 26, 2016

If you’d like to work on this please write a comment here. This is up for grabs!

How to Contribute

@lvwrence
Copy link
Contributor

I'll take this!

@ForbesLindesay
Copy link
Contributor

We could recommend st for serving the files. It's a pretty fully fledged node.js static file server with gzip enabled by default.

@gaearon
Copy link
Contributor Author

gaearon commented Jul 27, 2016

Thanks for the suggestion! I’ll use that instead.

gaearon added a commit that referenced this issue Jul 27, 2016
It has gzip built-in so the size numbers are closer to real world. Thanks @ForbesLindesay for the tip!
Related to #228
@gaearon
Copy link
Contributor Author

gaearon commented Jul 27, 2016

Hmm, st has some caching issues: isaacs/st#73.
I’ll probably have to back out of that.

@insin
Copy link
Contributor

insin commented Jul 27, 2016

Next candidate: https://github.com/scottcorgan/pushstate-server ? 😼

@gaearon
Copy link
Contributor Author

gaearon commented Jul 27, 2016

Okay, pushstate-server looks great so far: gzip, good defaults, no aggressive caching.
Updated the instructions to use it instead.

@lock lock bot locked and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants