Prepare Cloudflare Workers/Pages deploy for the static front-end.

Add wrangler assets config, multi-page Vite build (game + studio),
cache/WASM headers, and deploy scripts so `npm run deploy` publishes dist.
This commit is contained in:
ryanfitzpatrickio
2026-08-03 10:33:24 -05:00
parent dd819e991d
commit 7a196b6571
8 changed files with 1724 additions and 3 deletions
+25
View File
@@ -0,0 +1,25 @@
# Cloudflare Pages / Workers static asset headers.
# Vite copies everything under public/ into dist/ on build.
/*
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: interest-cohort=()
# Hashed Vite assets: long cache. WASM must load as application/wasm.
/assets/*
Cache-Control: public, max-age=31536000, immutable
/*.wasm
Content-Type: application/wasm
Cache-Control: public, max-age=31536000, immutable
# HTML entry points stay fresh so deploys pick up new asset hashes quickly.
/
Cache-Control: public, max-age=0, must-revalidate
/index.html
Cache-Control: public, max-age=0, must-revalidate
/character.html
Cache-Control: public, max-age=0, must-revalidate