Allow API routes in vercel.json rewrites

cgen-80844d0e0e4842c6b4539fc30fbe3380
This commit is contained in:
Builder.io 2025-11-15 05:20:43 +00:00
parent f810bdcba1
commit 6db4218ff6

View file

@ -2,7 +2,10 @@
"version": 2,
"buildCommand": "npm ci && npm run build",
"outputDirectory": "dist/spa",
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }],
"rewrites": [
{ "source": "/api/(.*)", "destination": "/api/$1" },
{ "source": "/(.*)", "destination": "/index.html" }
],
"headers": [
{
"source": "/assets/(.*)",