From 7c6b6771ab84686078624bcda089677a680c24cd Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 29 Nov 2023 01:35:46 +0100 Subject: [PATCH] fix(nuxt): skip prerendering all pages in hash mode (#24517) Co-authored-by: Diorcet Yann --- packages/nuxt/src/pages/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/pages/module.ts b/packages/nuxt/src/pages/module.ts index 91c2958289..956cf88c99 100644 --- a/packages/nuxt/src/pages/module.ts +++ b/packages/nuxt/src/pages/module.ts @@ -222,7 +222,7 @@ export default defineNuxtModule({ }) nuxt.hook('nitro:init', (nitro) => { - if (nuxt.options.dev || !nitro.options.static) { return } + if (nuxt.options.dev || !nitro.options.static || nuxt.options.router.options.hashMode) { return } // Prerender all non-dynamic page routes when generating app const prerenderRoutes = new Set() nuxt.hook('pages:extend', (pages) => {