"Nitro /api directory isn't compatible with Vercel" is this still true ? #3385
-
|
I'm currently deploying a Nuxt 3 application (with Nuxt 4 compatibility enabled) to Vercel. My API routes are located in the However, I came across the Vercel preset documentation for Nitro, which states:
This has led me to wonder: is my current |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
@cth-latest that docs warning applies to standalone Nitro (without Nuxt), not to Nuxt applications. your setup is fine and you don't need to change anything. here's why: standalone Nitro: files in Nuxt: the entire server (including API routes) gets bundled into a single serverless function that handles all routes. Nuxt's build process deploys a catch-all function, so Vercel doesn't intercept since you're using Nuxt 3 (with v4 compat), your |
Beta Was this translation helpful? Give feedback.
There is no difference between Nitro standalone and Nuxt regarding deployment to Vercel.
With build output API enabled and framework detection, vercel no longer will assume to use top level api/ dir.
The issue was due to legacy reasons in vercel cli and lack of nitro detection.