I'm authoring an Azure Function in TypeScript in VS Code. If I start the Azure Functions host locally (either by using F5 in VS Code or by running "npm start" from the command line), everything runs fine. However, when I make and save a change to my TypeScript code, the local Azure Function host doesn't pick up on the change/restart the function. I have to manually stop/restart it.
The default "start" entry in package.json appears to be trying to achieve this:
"start": "npm run start:host & npm run watch"
But running "npm start" does not appear to cause the restart-on-change behavior. I may not be looking in the right place, but it doesn't seem like the second command is even executing at all. That said, even if I have tsc watch running from inside VS Code while "func start" is running elsewhere, the Azure Function host still seems to need to be manually restarted after the transpiling happens.
Is there a way to make the local Azure Function host automatically restart whenever I make changes to my TypeScript code? Am I missing something about how this is supposed to work?
Thanks!