改善
Kaizen  · Today I Learned by Ville Säävuori

Vercel Cheat Sheet

Configuration

Redirects for JavaScript Routers

For routers like vue-router with history mode enabled, something like this in vercel.json works:

"rewrites": [
  {
    "source": "/(.*)",
    "destination": "/index.html"
  }
]

Redirects for Python Functions

This (legacy) configuration is the only one that seems to work with Python at the moment:

"routes": [
  {
    "src": "/(.*)",
    "dest": "/"
  }
]

Misc