perf(nuxt): increase static asset maxAge to 1yr (#19335)

This commit is contained in:
Daniel Roe 2023-02-28 14:06:31 +01:00 committed by GitHub
parent 021ba4310e
commit 32f6cb27b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
? { dir: resolve(nuxt.options.buildDir, 'dist/client') } ? { dir: resolve(nuxt.options.buildDir, 'dist/client') }
: { : {
dir: join(nuxt.options.buildDir, 'dist/client', nuxt.options.app.buildAssetsDir), 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 baseURL: nuxt.options.app.buildAssetsDir
}, },
...nuxt.options._layers ...nuxt.options._layers