mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-19 23:40:07 +00:00
perf: set maxAge
for various public assets (#1916)
This commit is contained in:
parent
a1026d3aab
commit
e062fb5e52
1 changed files with 22 additions and 0 deletions
|
@ -130,6 +130,28 @@ export default defineNuxtConfig({
|
|||
prerender: {
|
||||
crawlLinks: true,
|
||||
},
|
||||
publicAssets: [
|
||||
{
|
||||
dir: '~/public/avatars',
|
||||
maxAge: 24 * 60 * 60 * 30, // 30 days
|
||||
baseURL: '/avatars',
|
||||
},
|
||||
{
|
||||
dir: '~/public/emojis',
|
||||
maxAge: 24 * 60 * 60 * 15, // 15 days, matching service worker
|
||||
baseURL: '/emojis',
|
||||
},
|
||||
{
|
||||
dir: '~/public/fonts',
|
||||
maxAge: 24 * 60 * 60 * 365, // 1 year (versioned)
|
||||
baseURL: '/fonts',
|
||||
},
|
||||
{
|
||||
dir: '~/public/shiki',
|
||||
maxAge: 24 * 60 * 60 * 365, // 1 year, matching service worker
|
||||
baseURL: '/shiki',
|
||||
},
|
||||
],
|
||||
},
|
||||
sourcemap: isDevelopment,
|
||||
hooks: {
|
||||
|
|
Loading…
Reference in a new issue