Skip to content

Commit 36a21d4

Browse files
committed
correct distDir, add filesystem + SPA catch‑all, add vercel-build with 404 fallback
1 parent 80ff5ef commit 36a21d4

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"dev": "vite",
1616
"build": "vite build",
1717
"postbuild": "cp dist/index.html dist/404.html",
18+
"vercel-build": "vite build && cp dist/index.html dist/404.html",
1819
"build:dev": "vite build --mode development",
1920
"lint": "eslint .",
2021
"preview": "vite preview"

vercel.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"version": 2,
23
"builds": [
34
{
45
"src": "frontend/package.json",
@@ -10,7 +11,8 @@
1011
],
1112
"cleanUrls": true,
1213
"trailingSlash": false,
13-
"rewrites": [
14-
{ "source": "/(.*)", "destination": "/index.html" }
14+
"routes": [
15+
{ "handle": "filesystem" },
16+
{ "src": "/(.*)", "dest": "/index.html" }
1517
]
1618
}

0 commit comments

Comments
 (0)