Skip to content

Commit

Permalink
fix: enable includeUprefixedFallback on nitro:init hook (#1642)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Nov 13, 2022
1 parent e928b2f commit f7f719a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pages.ts
Expand Up @@ -28,12 +28,11 @@ export function setupPages(
return !options.differentDomains && DefaultLocalizeRoutesPrefixable(opts)
}

const includeUprefixedFallback = nuxt.options.ssr === false
// TODO:
// nuxt.hook('build:before', () => {
// debug('called build:before hook')
// includeUprefixedFallback = true
// })
let includeUprefixedFallback = nuxt.options.ssr === false
nuxt.hook('nitro:init', () => {
debug('enable includeUprefixedFallback')
includeUprefixedFallback = true
})

const pagesDir = nuxt.options.dir && nuxt.options.dir.pages ? nuxt.options.dir.pages : 'pages'
const { trailingSlash } = additionalOptions
Expand Down

0 comments on commit f7f719a

Please sign in to comment.