简体   繁体   中英

Is there a way to add/modify functions to a running firebase emulator?

I am using a firebase emulator to develop and test cloud functions. Every time I modify an existing function or when I want to add a new function, I essentially shut down the emulator, deploy the functions, and then restart the emulator. In this process, I lose all the data in the local firestore database (as a part of the emulator). Is there a way to deploy functions to incorporate modifications to existing functions as well as to include new functions without shutting down the emulator?

It seems to depend what you are deploying. There is a not in Firebase documentation :

Note : Code changes you make during an active session are automatically reloaded by the emulator. If your code needs to be transpiled (TypeScript, React) make sure to do so before running the emulator.

So if you generally you can run the emulator and when you change the code without stopping it, with exception of the languages mentioned in the note.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM