I have an app created by create-react-app.
After running npm run build I got a message:
File sizes after gzip:
550.11 KB build/static/js/main.0bef6e38.js
46.61 KB build/static/css/main.dffb4fca.css
Nice. But after running serve -s build I got size of app in browser equal to initial 2.5 Mb. So I checked the bundle in the file system and there it has the size of 2.5 Mb too.
So the question is: Why is this happening and what's the correct way to serve a react application? Thanks!