Skip to content

Commit c93cabf

Browse files
committed
Use rewrites instead of routes for Vercel
1 parent eeb6f4a commit c93cabf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

vercel.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
{ "src": "api/*.rs", "use": "@vercel/rust" },
66
{ "src": "www/**", "use": "@vercel/static" }
77
],
8-
"routes": [
9-
{ "src": "/api/(.*)", "dest": "/api/$1.rs" },
10-
{ "handle": "filesystem" },
11-
{ "src": "/", "dest": "/www/index.html" },
12-
{ "src": "/(.*)", "dest": "/www/$1" }
8+
"rewrites": [
9+
{ "source": "/api/:path*", "destination": "/api/:path*.rs" },
10+
{ "source": "/", "destination": "/www/index.html" },
11+
{ "source": "/:path*", "destination": "/www/:path*" }
1312
]
1413
}

0 commit comments

Comments
 (0)