back

by codazoda·9y ago·view on hn ↗
I'm including everything you need to deploy in those numbers. You included only React and not React-Dom. My own try at setting up React results in a 750k js file when I follow the instructions below. I realize this isn't minified yet and I welcome feedback on how to make it better.

https://www.joeldare.com/blog/post/create-a-react-app/

The top search results for react minified size show similar numbers to my 250k. There are a lot of people throwing out a lot of numbers that are different. Versions likely play a role, especially after 15. Here are some references.

https://gist.github.com/Restuta/cda69e50a853aa64912d

https://stackoverflow.com/questions/19807946/why-is-reacts-f...

Nothing I can find references a size as small as you mention with react and react dom. Most recommend writing with ES2016 which probably adds Babel overhead as well. When I build "Hello World" myself, I can't get anywhere near the small sizes.

I'd love someone to give me a proper smack-down on this. I want to love React since it's a recent requirement of my job. But with my current knowledge of it, I can't seem to get the size down.

1 comments
You need to add uglify to your webpack.config.js.

https://webpack.github.io/docs/list-of-plugins.html#uglifyjs...