Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHuge savings switching to modular Firebase builds #48
Conversation
Thanks for the PR! Actually, it's probably more relevant to submit the same PR to the 2.0 version instead: https://github.com/vuejs/vue-hackernews-2.0 P.S. just tested the 2.0 version with lighthouse and already at 894.6ms time to interactive on desktop :) |
Lol. I had no idea there was a separate 2.0 version :). I can submit there too. Thanks for the review! |
Hmm, I tried the module import version in v2, but didn't notice a big size win. So I went back and ran v1 using Firebase 2.4.2 and the output build.js was 274kb instead of 448kb. It seems Firebase v3, even using just |
Over in ReactHN, we saw decent savings switching from including the entire Firebase SDK to just using the parts we needed (database and app). This PR switches Vue HN over to using just those pieces and bumps you to a more recent version of Firebase too.
Build before:

Build after:

A lot of this is down to no longer needing to include Firebase features like auth, storage and messaging.
Gzipped, this would put the total build.js at under 100KB (closer to 90):

It was previously 147KB gzipped before this change.
On Lighthouse, this makes Vue interactive in <1700ms on desktop:

and around the 4s mark on a Nexus 5X with initial testing.
Views all appear to work as intended: