Build webui during Vercel deployment

This commit is contained in:
CJACK.
2026-02-04 13:57:34 +08:00
parent 840042d301
commit f65cf0c510
2 changed files with 30 additions and 4 deletions

View File

@@ -6,10 +6,31 @@
"use": "@vercel/python"
}
],
"buildCommand": "bash scripts/build-webui.sh",
"routes": [
{
"src": "/(.*)",
"dest": "app.py"
}
],
"headers": [
{
"source": "/admin/assets/(.*)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
},
{
"source": "/admin/(.*)",
"headers": [
{
"key": "Cache-Control",
"value": "no-store, must-revalidate"
}
]
}
]
}
}