Description
Hello team 👋, really enjoying the svelte-kit experience so far!
One thing I noticed is when using vercel's serverless functions alongside a svelte-kit app there are a few nuances and unintended side effects, namely with client-side code not executing in local dev when svelte-kit is wrapped with vercel dev
minimal example repo: https://github.com/josefaidt/svelte-kit-vercel-local-issue
With vercel dev
which executes svelte-kit dev -p $PORT
and gives us the API routes
With svelte-kit dev
, no API routes
When the application is deployed to vercel, everything appears fine! This seems to only affect local development.
- Live implementation: https://sk-vercel-local-issue.vercel.app/
- Live API route: https://sk-vercel-local-issue.vercel.app/api/hello
I've since found a way around this behavior and I am fully aware svelte-kit is in beta so this will likely change, however I wanted to bring it up and reach out in case I am going against the grain with this setup.