Upgrade firebase to v9 with compat layer #4852
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This is part of a series of PRs being spun off from my WIP branch to get the Highlight web app ready for Reflame. Hopefully this makes things a bit easier to review, test, and merge. 🙂
We were on v8 of the firebase SDK before, which had a whole bunch of issues when I tried to get it running on the Highlight app on Reflame due to its esoteric module structure.
So I looked into what it would take to get it upgraded to v9, and apparently they made things pretty straightforward with
firebase/compat/*entry points we could use to upgrade without having to change any of our downstream code, just the imports.That's all this PR does. Bumps firebase to the latest v9, and replaces all of our imports with
firebase/compat/*. It also came with a slight ~15KB bundle size savings, likely due to the more tree-shakable module structure:Before:
After:
How did you test this change?
I ran the app using yarn turbo run dev --filter frontend... but still haven't figured out how to get past the signin screen there.
But I have been poking around on the Reflame preview of the app with this version of firebase for quite a while now, and haven't noticed any related issues.
Are there any deployment considerations?
Probably worth deploying to a Render preview and poking around there before merging.