'Why is the package size of NPM run bulid inconsistent with the website (React)

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



Solution 1:[1]

Its file size after gzip, Not actual file size

enter image description here

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 1900 TD Lemon
Solution 2 Mounish