Firebase start local emulators for specified codebase only
While having two separate codebases (one for v1 and the other one for v2 functions), it is very frustrating that whenever I run firebase emulators:start --only functions:${codebase-name}, it initializes all the codebase functions.
I would like to start only those functions which falls under the specified codebase name.
A temporary workaround for this issue is by using the following approach. However, it does not deploy the functions properly.
This is a great feature request! I'm going to add that label here and if anyone in the community wants to open a pull request, that would be awesome!
I've successfully managed to start v1 and v2 functions separately using local emulators. I had to define two firebase.json files, one for v1 and the other for v2 (firebase.json and firebase-v2.json. The content of firebase-v2.json is very similar to firebase.json except for the names of source and codebase. In my case, it's functions-v2 and v2, respectively. Now in order to run the v2 functions only, I run this command firebase --config=../firebase-v2.json emulators:start --only functions while for v1 functions, I simply run firebase emulators:start --only functions
I have expected it to work similar to hosting
firebase emulators:start --only=functions:[codebase-name],
But seems like it loads all the function anyway.
Is this feature still in development? A year has passed.
Any updates on this?
@colerogers Do you know if anyone has prioritized working on this? I've just begun setting up Firebase in a monorepo with multiple "codebases", and while this bug doesn't technically block local dev, it does force us to run our entire monorepo whenever we're really only working on one codebase.
(IMHO this should be classified as a bug, not a feature request, given the emulators:start command is not properly interpreting the --only option.)
This is becoming even more of a problem with the experimental webframeworks. firebase emulators:start --only functions:codebase,hosting:site should be congruent with the same capability of firebase deploy --only functions:codebase,hosting:site.
Now nextjs ssr function is also getting found and hosted in parallel to the local start dev. No way to cleanly opt out.