Using Brotli with Firebase hosting

Somehow I ended up at this question, even though it is dated I wanted to mention it should be possible to use Brotli compression now using Firebase Cloud Functions. I havent tested it yet, but since you can run your own node.js code via Cloud Functions I don't see any reason why this would not work. Afcourse using Cloud Functions could slow down your app, so be sure to test carefully going this approach. It might not give the loading boost you are hoping for.


Firebase Hosting now enables Brotli compression by default: https://firebase.googleblog.com/2020/08/firebase-hosting-new-features.html