-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hot Reload not working when Typescript Function is in subdirectory #7795
Comments
The functions host watches the folder in which it is started. Since the host is being started in However, if you changed your tsconfig to compile it to Here's the updated app: https://github.com/panmau/azure-function-hot-reload-repro/compare/main...anthonychu:fix-hot-reload |
Thanks a lot for your answer, this works well for a workaround! I'm not sure whether this is the correct solution though.
(Maybe because it doesn't like the If you think that having the dist in src is the way to go, I feel like this should be at least better highlighted in the documentation as I couldn't find this info ( Let me know what you think. |
@panmau yes the issue is with This issue is also related to #5373 - we plan to support more complex file structures in general. |
The hot reloading is not working when a Typescript function is in a subdirectory and you're using one of the following ways to start it:
Repro
I made a reproduction repository with which I can reliably reproduce this issue: https://github.com/panmau/azure-function-hot-reload-repro
curl http://localhost:7071/api/Test
curl http://localhost:7071/api/Test
The repro is based on the normal configuration that you receive with:
The difference is that I moved the directory of the function one level down, added one of the ways to start the function to package.json and updated the @azure/function package.
Environment
Let me know whether you need any more info and if you can reproduce it.
I am willing to contribute the bugfix but I need some guidance in which area it could possibly be.
The text was updated successfully, but these errors were encountered: