firebase.js is SO DAMN HUGE!
Roman Dubinin
927

This was an interesting read so thank you for taking the time to put some thoughts together! The size issue is something we want to address as it is a known barrier to entry for those looking to use Firebase.

In addition, I’d be very interested in hearing more about this:

“Importing firebase/app alone didn’t work properly in the universal environment.”

If you have time to isolate and reproduce the issue (the Github repo can be found here: https://github.com/firebase/firebase-js-sdk) I would be happy to get that fixed :)

I did notice, in your article, that you were using the firebase/firebase-browser and firebase/firebase-node binaries. These binaries are, as you mentioned, extremely large! You would be much better served by including the individual SDK binaries (i.e. firebase/database, firebase/storage, firebase/auth, firebase/messaging).

By leveraging the individual SDKs, you are going to get a much smaller bundles. In addition, you are going to be able to prioritize which SDKs are loaded and optimize for your critical path.

Like what you read? Give Josh Crowther a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.