Reputation: 7569
I am using the Firebase Functions emulator. But when I make a change to the code, it still runs the old version. I am using Typescript.
How can I get it to run the new version?
Upvotes: 8
Views: 2354
Reputation: 129
npm run build -- --watch | firebase emulators:start --only functions
Upvotes: 7
Reputation: 7569
As stated in their 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.
You can do this by running npm run build
in your functions folder.
Upvotes: 7