Add wrangler assets config, multi-page Vite build (game + studio), cache/WASM headers, and deploy scripts so `npm run deploy` publishes dist.
26 lines
735 B
Plaintext
26 lines
735 B
Plaintext
# 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
|