Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize bundle size #8

Open
addyosmani opened this issue Oct 22, 2018 · 2 comments
Open

Optimize bundle size #8

addyosmani opened this issue Oct 22, 2018 · 2 comments

Comments

@addyosmani
Copy link
Collaborator

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:

image

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.
@jonchenn
Copy link
Collaborator

I can take on this one.

@addyosmani
Copy link
Collaborator Author

Sgtm!

@jonchenn jonchenn pinned this issue Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants