mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt): don't force prerender /
if user doesn't have that route (#8639)
* fix(nuxt): don't force prerender `/` if user doesn't have `~/pages/index.vue` * docs: add code comment
This commit is contained in:
parent
496fa14468
commit
71ecffa234
@ -102,6 +102,9 @@ export default defineNuxtModule({
|
||||
})
|
||||
nuxt.hook('nitro:build:before', (nitro) => {
|
||||
for (const route of nitro.options.prerender.routes || []) {
|
||||
// Skip default route value as we only generate it if it is already
|
||||
// in the detected routes from `~/pages`.
|
||||
if (route === '/') { continue }
|
||||
prerenderRoutes.add(route)
|
||||
}
|
||||
nitro.options.prerender.routes = Array.from(prerenderRoutes)
|
||||
|
Loading…
Reference in New Issue
Block a user