react-shrine
react-shrine copied to clipboard
Optimize bundle size
After adding code-splitting, Brotli, preloading and preconnect, the app is hitting a TTI of ~3.7s on WebPageTest. I'd like to see if there's opportunity to do better.
Bundle size is roughly ~70KB over the wire (compressed). If we unpack this using source-map-explorer, it looks like this:

Biggest offenders
- React 16 and React DOM. Moving over to Preact and Preact Compat locally save ~15KB but compatibility breaks in ways I need to dig into further.
- JSS is way larger than the value it's bringing here.
- Material UI is about as small as I think we can get it.
- Between core-js, babel-runtime and promise it looks like we could break out some of those polyfill bundles to be conditionally loaded to older browsers.
I can take on this one.
Sgtm!