fix(cache): disable html caching to prevent stale nuxt chunks

This commit is contained in:
Ruslan Bakiev
2026-04-21 12:16:40 +07:00
parent 008f41d891
commit 7033df0fbc

View File

@@ -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