reindexio / reindex-starter-kit-react

A quickstart template for building an app with React, Relay and Reindex
https://www.reindex.io
MIT License
57 stars 23 forks source link

Production build is 458KB #9

Open owencm opened 8 years ago

owencm commented 8 years ago

Firstly, thanks a lot for building this, I'm super pumped about the possibility of working with this stack.

I just downloaded and built this example and found it's currently 458KB (ungzipped).

I'm worried that the payload sizes are way too big to simply be practical, especially once actual business logic gets added.

Did I miss something? Given React is ~1/10th of that it seems possible I have some configuration wrong and the actual payload should be much smaller?

If not, are there plans to reduce the payload size?

freiksenet commented 8 years ago

We haven't looked at optimizing build size yet to be honest. Seems that React+Relay are about 200KB minified (https://github.com/facebook/relay/issues/996), so we have extra 258KB from somewhere. I'll take a look at this at some point to see if there are any low hanging fruits.

TheGhoul21 commented 7 years ago

on the client-side you may let the browser cache as much as possible (using < script > tags with minified versions). Same for the build, ufligy and minify to have smaller builds