0

I use NPM run bulid to package the website, and the console displays chunk JS is 1.04MB in size, but when I open ifinder locally, the file size is 3.8m. Why?

[png1] [1]: https://i.stack.imgur.com/uOi0R.png ; [png2] [2]: https://i.stack.imgur.com/olnqL.png

noneName
  • 3
  • 1

2 Answers2

1

Its file size after gzip, Not actual file size

enter image description here

0

Beacuse it was compressed by gzip. Gzip compresses upto 90% of the file size.

Mounish
  • 31
  • 1
  • 5
  • so, How can I use these compressed files to deploy to the server? i want to get after gzip file. – noneName May 07 '22 at 07:00
  • Hello , if you want to use this files in the server , read this answers [Answer1](https://stackoverflow.com/questions/58700704/does-create-react-app-provides-gzip-compression-out-of-the-box) [Answer2](https://stackoverflow.com/questions/56186336/how-to-compress-the-files-using-gzip-in-react-app/67716096#67716096) @noneName – Hakob Sargsyan May 12 '22 at 06:54