seguimos con la seguridad
All checks were successful
build-and-deploy / build (push) Successful in 26s
build-and-deploy / deploy (push) Successful in 4s

This commit is contained in:
2025-10-11 18:28:49 -06:00
parent d966fab4ca
commit 811b525cfc
2 changed files with 30 additions and 2 deletions

View File

@@ -62,6 +62,24 @@ export default defineNuxtConfig({
'_nuxt/builds/**/*.json',
],
runtimeCaching: [
// Nuxt build metadata: Network-Only with graceful fallback for offline
{
urlPattern: /\/_nuxt\/builds\/(meta|latest)\/.*\.json$/,
handler: 'NetworkOnly',
options: {
plugins: [
{
// Fail silently when offline - these are HMR/build metadata files
handlerDidError: async () => {
return new Response(JSON.stringify({}), {
status: 200,
headers: { 'Content-Type': 'application/json' }
})
}
}
]
}
},
// Static images: Cache-First (offline-ready)
{
urlPattern: /\.(png|jpg|jpeg|svg|gif|webp|ico)$/,
@@ -197,7 +215,9 @@ export default defineNuxtConfig({
// Nitro configuration for proxy support
nitro: {
experimental: {
wasm: true
wasm: true,
// Disable payload extraction in SPA mode to avoid build metadata fetches
payloadExtraction: false
},
prerender: {
crawlLinks: true,
@@ -206,6 +226,14 @@ export default defineNuxtConfig({
// Development configuration for proxy
devProxy: process.env.NODE_ENV === 'development' ? {} : undefined
},
// App configuration
app: {
// Disable build manifest fetching in production
buildAssetsDir: '/_nuxt/',
// Disable automatic payload extraction
keepalive: false
},
// Runtime configuration
runtimeConfig: {