Skip to content

Commit

Permalink
fix(nuxt): skip prerendering all pages in hash mode (#24517)
Browse files Browse the repository at this point in the history
Co-authored-by: Diorcet Yann <diorcet.yann@gmail.com>
  • Loading branch information
danielroe and diorcety committed Nov 29, 2023
1 parent 09161d0 commit 7c6b677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/pages/module.ts
Expand Up @@ -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<string>()
nuxt.hook('pages:extend', (pages) => {
Expand Down

0 comments on commit 7c6b677

Please sign in to comment.