svelte-adapter-azure-swa
svelte-adapter-azure-swa copied to clipboard
feat: switch to Azure Functions v4
This switches to the new v4 runtime of Azure functions in Azure Static Webapps
- remove function.json - it is not needed anymore
- rename function path to "sk_render" since v4 does not allow the path to start with "__"
- add @azure/functions to external esbuild options (if not already there) - it's needed by the new runtime
See also: https://techcommunity.microsoft.com/t5/apps-on-azure-blog/azure-functions-version-4-of-the-node-js-programming-model-is-in/ba-p/3773541
closes #159
@derkoe no rush, but please re-request my review on the PR once you've addressed my comments - that way it doesn't get lost in my inbox
@derkoe no rush, but please re-request my review on the PR once you've addressed my comments - that way it doesn't get lost in my inbox
Guess I've addressed all the issues - sorry for the delay. (Also rebase on current main today).
Guys, I have tried the V4 adapter, it seems to be working with the local SWA, but when deployed to the azure (github actions), deployment says - i'm done alright, but in the web I get "404 - not found". I packed the module with npm pack and reference it in my app via file:....
I have issues with logging in azure, so cannot really navigate, why it's happening.
after some research, it seems that the function fails to start, but I cannot figure out how to get hands on the crash logs for the SWA. @derkoe @geoffrich if you happen to see the message and maybe suggest, what could be done, would be great. I updated all of the deps and adjusted the code accordingly, but this did not help unfortunately.
@ktarmyshov I'm seeing a similar issue on the demo site after merging this PR, though I didn't see it while testing out the PR branch against another repo. I've opened https://github.com/geoffrich/svelte-adapter-azure-swa/issues/188 to track the issue. Hopefully I'll get it resolved soon, though my time to work on this over the next few weeks may be limited.