Skip to content

Commit eaa6eab

Browse files
committed
feat: add Netlify configuration and SPA fallback for client-side routing
1 parent 7f7315b commit eaa6eab

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

netlify.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[build]
2+
base = "."
3+
publish = "playground/.output/public"
4+
command = "pnpm install && pnpm dev:prepare && pnpm dev:build"
5+
6+
[[redirects]]
7+
from = "/*"
8+
to = "/index.html"
9+
status = 200
10+
11+
[build.environment]
12+
NODE_VERSION = "24"
13+
14+
[[headers]]
15+
for = "/*"
16+
[headers.values]
17+
X-Frame-Options = "DENY"
18+
X-Content-Type-Options = "nosniff"
19+
Referrer-Policy = "strict-origin-when-cross-origin"
20+
21+
[[headers]]
22+
for = "/_nuxt/*"
23+
[headers.values]
24+
Cache-Control = "public, max-age=31536000, immutable"
25+
26+
27+
28+

playground/public/_redirects

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPA fallback for client-side routing
2+
/* /index.html 200

0 commit comments

Comments
 (0)