Agri-AI / vercel.json
Akash-Dragon's picture
fix(vercel): add index.html and SPA rewrites to resolve 404 NOT_FOUND on Vercel
243d4bd
Raw
History Blame Contribute Delete
617 Bytes
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"buildCommand": "cd agriculture-ai-frontend && npm install && npm run build",
"outputDirectory": "agriculture-ai-frontend/dist",
"framework": "vite",
"build": {
"env": {
"PYTHON_VERSION": "3.11",
"PYO3_USE_ABI3_FORWARD_COMPATIBILITY": "1"
}
},
"functions": {
"api/index.py": {
"excludeFiles": "agriculture-ai-frontend/**"
}
},
"rewrites": [
{
"source": "/api/v1/:path*",
"destination": "/api/index.py"
},
{
"source": "/((?!api/).*)",
"destination": "/index.html"
}
]
}