Create-react-app: gzip build confusion

Created on 30 Nov 2016  路  4Comments  路  Source: facebook/create-react-app

Pretty sure I am missing something here so please bear with me.

When I build a project I get the following message:

gzip

However the js build is actually 483kb. What am I missing here? Cheers.

Most helpful comment

I think it is better to show the actual size too. This got me confused before. I thought that it already gzip'ed but it is not. Might reconsider this #1908 ?

All 4 comments

The built js file in your directory is not gzipped, it's only minified. When you serve that file the file and gzip it (which is the standard way to deliver content) that's the size that will actually be transferred. If you use the pushstate server as demonstrated in the build output and look at the transfer size in the network inspector in your browser dev tools you will see it only transfers the amount specified by the gzip size.

It might be handy to read a guide on how web servers do gzip

Thanks for the explanation @tbillington, much appreciated!

I think it is better to show the actual size too. This got me confused before. I thought that it already gzip'ed but it is not. Might reconsider this #1908 ?

Happy to review PRs that do something differently.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fson picture fson  路  3Comments

alleroux picture alleroux  路  3Comments

jnachtigall picture jnachtigall  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments

stopachka picture stopachka  路  3Comments