refactor: use route rules for prerendering

zio/stable
Daniel Roe 2023-02-08 18:12:51 +01:00
parent c25715b26d
commit 7da49afde5
1 changed files with 5 additions and 2 deletions

View File

@ -121,7 +121,12 @@ export default defineNuxtConfig({
},
},
routeRules: {
// Static generation
'/': { prerender: true },
'/settings/**': { prerender: false },
// incremental regeneration
'/api/list-servers': { swr: true },
// CDN cache rules
'/manifest.webmanifest': {
headers: {
'Content-Type': 'application/manifest+json',
@ -139,8 +144,6 @@ export default defineNuxtConfig({
},
prerender: {
crawlLinks: true,
routes: ['/'],
ignore: ['/settings'],
},
},
sourcemap: !isDevelopment,