- Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Quick feature request that I'd be happy to take a stab at implementing if there's interest:
It would be helpful if it was possible to specify a per function include/exclude for packaging. So, for example, if I had handler1, handler2, and handler3 in my index.js I could then add the following to my firebase.json (or something similar);
{ <hosting_config>, "functions": { "source": <functions_source>, "handler1": { "include": "path/to/handler1/files", "exclude": "path/**" }, etc. } } I'll admit that my need/reasoning for this is probably in the edge of what most typical user's would experience in regards to firebase. The issue I'm facing at the moment though is that I have a fairly large amount of heavy handlers and when I deploy handler1 it gets packaged with the code for handler2 and handler3 when there's zero need for that code from the perspective of handler1. This is beginning to mean that my functions package size is nearing the allotted limit of 100MB (seen here). With the addition of a per function include/exclude I could then specify what exact files (outside of the index.js which should remain required) should be packaged and deployed for a corresponding function.
Hopefully all that makes sense. Happy to expand further if not!