最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Does Create React App provides gzip compression out of the box? - Stack Overflow

programmeradmin5浏览0评论

Does Create React App provides gzip pression out of the box?

Since in console output it shows below , is it enough to serve them in production , is any particular configuration required ? Please confirm if anyone is aware

File sizes after gzip:

88.96 KB build\static\js\2.67a35d8a.chunk.js

45.81 KB build\static\js\3.06562e80.chunk.js

2.17 KB build\static\js\4.2dca02a2.chunk.js

1.71 KB build\static\js\main.01ef12c5.chunk.js

Does Create React App provides gzip pression out of the box?

Since in console output it shows below , is it enough to serve them in production , is any particular configuration required ? Please confirm if anyone is aware

File sizes after gzip:

88.96 KB build\static\js\2.67a35d8a.chunk.js

45.81 KB build\static\js\3.06562e80.chunk.js

2.17 KB build\static\js\4.2dca02a2.chunk.js

1.71 KB build\static\js\main.01ef12c5.chunk.js

Share Improve this question asked Nov 4, 2019 at 20:37 Vaibhav MittalVaibhav Mittal 1672 silver badges8 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

No it does not. And as a matter of fact, It does not allow us to change the default configuration of the Module Bundler which it uses ( Webpack). If you want to serve gzipped pressed bundle to make your apps load faster on client side, then you can find my answer posted at https://stackoverflow./a/67716096/2631276

I don't believe so but it looks like you can configure this on your own in your package.json file in your postbuild script.

This post might be helpful for you.