SolidJSS
SolidJSโ€ข2y ago
Spooky Dooky

Issue deploying Solid Start server functions on Vercel

Hi all,
i'm having trouble getting functions with "use server" to run correctly on Vercel.
The App iteslf runs just fine - using SPA routing etc all works. Locally, the server functions also work, but once dploying to vercel I get 405 Method not allowed.
I have set up the preset
export default defineConfig({
  ssr: false,
  middleware: "./src/middleware.ts",
  appRoot: "src",
  server: {
    preset: "vercel",
  },
...

and also added the rewrite
{
  "rewrites": [
    {
      "source": "/(.*)",
      "destination": "/index.html"
    }
  ]
}


I see no other mentions of Vercel in the docs, what could be wrong?

Thanks!
Was this page helpful?