svelte-adapter-azure-swa icon indicating copy to clipboard operation
svelte-adapter-azure-swa copied to clipboard

feat: switch to Azure Functions v4

Open derkoe opened this issue 1 year ago • 1 comments

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 avatar Jun 25 '24 20:06 derkoe

@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

geoffrich avatar Jul 23 '24 21:07 geoffrich

@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).

derkoe avatar Nov 17 '24 20:11 derkoe

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.

ktarmyshov avatar Feb 28 '25 13:02 ktarmyshov

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 avatar Mar 01 '25 20:03 ktarmyshov

@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.

geoffrich avatar Mar 03 '25 01:03 geoffrich