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:
@@ -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
|
||||
Reference in New Issue
Block a user