Closed DallasHoff closed 1 day ago
facing the same issue
According to this comment, it is a regression in Nuxt 3.12. https://github.com/nuxt/nuxt/issues/27490#issuecomment-2162890462
Until it fixes in the upstream you can add this route rule into your config.
export default defineNuxtConfig({
routeRules: {
'/': {
prerender: true
}
},
})
According to this comment, it is a regression in Nuxt 3.12. nuxt/nuxt#27490 (comment)
Until it fixes in the upstream you can add this route rule into your config.
export default defineNuxtConfig({ routeRules: { '/': { prerender: true } }, })
This doesn't work for me unfortunately. If I downgrade to Nuxt 3.11 it renders 19 routes. If I upgrade to Nuxt 3.12 I get 3 but they don't render correctly. If I do it the other way as described in that issue, then I can specify each one explicitly and that seems to work, but it's not ideal (only tested rendering one).
The new 3.12.2 patch of nuxt fixed this.
The new 3.12.2 patch of nuxt fixed this.
This issue is not fixed for me in 3.12.2.
I cannot get all my routes to prerender as they normally do when I generate. I'm running a client side only (ssr: false), project where we always build to production staticly.
Without making any modifications in 3.11 when I run npm run generate, it works great and prerenders 19 routes. the static generation works great etc.. then I upgrade to 3.12.2, and it renders 4 routes, but they only seem to be the default 404 and things like that... none of my actual pages. One note is that our software doesn't have a page at the root "/", as we are using nuxt to replace old legacy pages in an older application. This hasn't been a problem in any previous version of Nuxt.
On 3.11 I have 19 initial routes which includes all my actual pages I've created and it doesn't have the / route (which is correct as that route doesn't exist in my project)
Environment
Darwin
v20.10.0
3.12.1
3.12.0
2.9.6
npm@10.8.1
-
css
,modules
@nuxt/content@2.12.1
-
Reproduction
Repo (disregard the repo name; it's for a different issue)
npx nuxi@latest module add content
nuxt generate
.output/public/index.html
exists since Nuxt 3.11 is installednpx nuxi@latest upgrade --force
to upgrade Nuxt to 3.12nuxt generate
again.output/public/index.html
does not existDescribe the bug
After upgrading to Nuxt 3.12,
nuxt generate
outputs noindex.html
or HTML files for any other pages defined in thepages
directory if the Nuxt Content module is installed.There is no error displayed in the output of
nuxt generate
. It simply reports that the crawler only found 3 routes:200.html
,404.html
, and/api/_content/cache.1718155374568.json
. If@nuxt/content
is removed fromnuxt.config.ts
,nuxt generate
will find and render the rest of the pages.Additional context
No response
Logs
No response