From 32f6cb27b7306ec3ff3f4ce7fbd1d60eaac47efd Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 28 Feb 2023 14:06:31 +0100 Subject: [PATCH] perf(nuxt): increase static asset maxAge to 1yr (#19335) --- packages/nuxt/src/core/nitro.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/core/nitro.ts b/packages/nuxt/src/core/nitro.ts index 424432219b..e4c94f5d63 100644 --- a/packages/nuxt/src/core/nitro.ts +++ b/packages/nuxt/src/core/nitro.ts @@ -86,7 +86,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) { ? { dir: resolve(nuxt.options.buildDir, 'dist/client') } : { dir: join(nuxt.options.buildDir, 'dist/client', nuxt.options.app.buildAssetsDir), - maxAge: 30 * 24 * 60 * 60, + maxAge: 31536000 /* 1 year */, baseURL: nuxt.options.app.buildAssetsDir }, ...nuxt.options._layers