From 6ffd2c5d54bdebb523b820e372beebe1a5b31d2e Mon Sep 17 00:00:00 2001 From: "Tech. TTGames" <50541739+Tech-TTGames@users.noreply.github.com> Date: Thu, 27 Aug 2026 17:53:43 +0300 Subject: [PATCH 1/3] Set TypeScript target to ES2022 and configure Terser for modern syntax minification to avoid downgrading --- frontend/tsconfig.json | 1 + frontend/vite.config.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 3575c101..0eee2a26 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -7,6 +7,7 @@ }, "strict": true, "skipLibCheck": true, + "target": "ES2022", "module": "ESNext", "moduleResolution": "bundler", "allowImportingTsExtensions": true, diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 55071fba..7b6198a2 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -114,6 +114,9 @@ export default defineConfig(({ mode }) => { }, target: "es2022", minify: "terser", + terserOptions: { + ecma: 2022, // Retains modern ES syntax during minification + }, sourcemap: false, }, }; From 1df86bef85615142579d6dad8145083e357b1e7c Mon Sep 17 00:00:00 2001 From: "Tech. TTGames" <50541739+Tech-TTGames@users.noreply.github.com> Date: Thu, 27 Aug 2026 17:56:15 +0300 Subject: [PATCH 2/3] Add default security and cache headers for all routes --- frontend/public/_headers | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 frontend/public/_headers diff --git a/frontend/public/_headers b/frontend/public/_headers new file mode 100644 index 00000000..43034f4c --- /dev/null +++ b/frontend/public/_headers @@ -0,0 +1,16 @@ +# Default security and cache headers for all routes +/* + X-Frame-Options: DENY + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin + Permissions-Policy: camera=(), microphone=(), geolocation=() + Strict-Transport-Security: max-age=31536000; includeSubDomains; preload + Cache-Control: public, max-age=0, must-revalidate + +# Immutable 1-year cache for Vite hashed production bundle assets +/assets/* + Cache-Control: public, max-age=31536000, immutable + +# Prevent stale HTML caching so new deployments hit users immediately +/index.html + Cache-Control: public, max-age=0, must-revalidate \ No newline at end of file From 0cd12a1166a1966bef437f4441ced9c9b2864f2b Mon Sep 17 00:00:00 2001 From: biast12 <53872542+biast12@users.noreply.github.com> Date: Sun, 18 Oct 2026 21:50:00 +0200 Subject: [PATCH 3/3] Adjust frontend deployment headers and targets Refines security and caching headers, adds an assets-only 404 page to preserve SPA fallback behavior, and aligns TypeScript and Terser output with ES2020 compatibility. --- frontend/public/_headers | 9 +-------- frontend/public/assets/404.html | 3 +++ frontend/tsconfig.json | 1 - frontend/vite.config.ts | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) create mode 100644 frontend/public/assets/404.html diff --git a/frontend/public/_headers b/frontend/public/_headers index 43034f4c..ec46c8e6 100644 --- a/frontend/public/_headers +++ b/frontend/public/_headers @@ -1,16 +1,9 @@ -# Default security and cache headers for all routes /* X-Frame-Options: DENY X-Content-Type-Options: nosniff Referrer-Policy: strict-origin-when-cross-origin Permissions-Policy: camera=(), microphone=(), geolocation=() - Strict-Transport-Security: max-age=31536000; includeSubDomains; preload - Cache-Control: public, max-age=0, must-revalidate + Strict-Transport-Security: max-age=31536000; includeSubDomains -# Immutable 1-year cache for Vite hashed production bundle assets /assets/* Cache-Control: public, max-age=31536000, immutable - -# Prevent stale HTML caching so new deployments hit users immediately -/index.html - Cache-Control: public, max-age=0, must-revalidate \ No newline at end of file diff --git a/frontend/public/assets/404.html b/frontend/public/assets/404.html new file mode 100644 index 00000000..316ff066 --- /dev/null +++ b/frontend/public/assets/404.html @@ -0,0 +1,3 @@ + + +Not found diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 0eee2a26..3575c101 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -7,7 +7,6 @@ }, "strict": true, "skipLibCheck": true, - "target": "ES2022", "module": "ESNext", "moduleResolution": "bundler", "allowImportingTsExtensions": true, diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 7b6198a2..91cd8ea0 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -115,7 +115,7 @@ export default defineConfig(({ mode }) => { target: "es2022", minify: "terser", terserOptions: { - ecma: 2022, // Retains modern ES syntax during minification + ecma: 2020, }, sourcemap: false, },