From 7033df0fbce5857c1b735bd5924cefa71a991060 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Tue, 21 Apr 2026 12:16:40 +0700 Subject: [PATCH] fix(cache): disable html caching to prevent stale nuxt chunks --- nuxt.config.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nuxt.config.ts b/nuxt.config.ts index 37efc0b..82288a6 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -188,6 +188,20 @@ export default defineNuxtConfig({ } } }, + routeRules: { + // Avoid stale HTML after deploys (old page -> missing _nuxt chunks -> white flash). + '/**': { + headers: { + 'cache-control': 'no-store' + } + }, + // Keep long-lived immutable cache for hashed static assets. + '/_nuxt/**': { + headers: { + 'cache-control': 'public, max-age=31536000, immutable' + } + } + }, devServer: { host: '0.0.0.0', port: 3000