Skip to content

Document that vercel functions should be created as SvelteKit endpoints聽#781

Description

@josefaidt

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
image

With svelte-kit dev, no API routes
image

When the application is deployed to vercel, everything appears fine! This seems to only affect local development.

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationpkg:adapter-vercelPertaining to the Vercel adapter

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions