Skip to content

Commit 041afa0

Browse files
committed
Fix Vercel routing for static site
1 parent 89727bb commit 041afa0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

vercel.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
{
22
"cleanUrls": true,
3-
"public": "www",
4-
"builds": [{ "src": "api/*.rs", "use": "@vercel/rust" }],
5-
"rewrites": [
6-
{ "source": "/api/:path*", "destination": "/api/:path*.rs" }
3+
"public": true,
4+
"builds": [
5+
{ "src": "api/*.rs", "use": "@vercel/rust" },
6+
{ "src": "www/**", "use": "@vercel/static" }
7+
],
8+
"routes": [
9+
{ "src": "/api/(.*)", "dest": "/api/$1.rs" },
10+
{ "handle": "filesystem" },
11+
{ "src": "/", "dest": "/www/index.html" },
12+
{ "src": "/(.*)", "dest": "/www/$1" }
713
]
814
}

0 commit comments

Comments
 (0)