As per Nuxt 3.0
, seems like generate.exclude doesn't work yet.
Alternative solution is nitro.prerender.ignore (yet to be documented) which only support startsWith
matching (no RegExp
or function
).
Edit nuxt.config.ts
export default defineNuxtConfig({ nitro: { prerender: { // routes: ['/sitemap.xml'], ignore: [ '/api/_content' ] } }})