1.0.9 • Published 3 years ago

firebase-functions-cache v1.0.9

Weekly downloads
18
License
MIT
Repository
github
Last release
3 years ago

Firebase Cache Repro WIP

About

By default, firebase does not generate cache files for functions. As a result, running firebase deploy causes all functions to be re-deployed regardless if they were modified or not.

Solution

We can use webpack to bundle all the functions from the index.js file into a single bundle.js file. From there, we can run a script that creates hashes of all of the named functions using https://www.npmjs.com/package/object-hash.

Then we can save these hashes and commit them back to the repo. In our CI, we can check if hashes have changed and deploy using the --only flag for modified functions.

Reference

I am replicating the solution suggested by https://stackoverflow.com/a/58380228 last year with a code implementation.

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago