Closed Mini-ghost closed 4 months ago
I confirm both the problem ('/'
not included implicitly) and that adding it explicitly makes it work.
@Mini-ghost I appreciate you for sharing. I used your workaround.
export default defineNuxtConfig({
// ...
nitro: {
prerender: {
routes: ['/sitemap.xml', '/'],
},
},
});
Thanks for the workaround guys.
This is actually not related to Content module but Nuxt itself. There is a regression in Nuxt which cause removing /
from pre-render routes and therefore static generation breaks.
I second on https://github.com/nuxt/content/issues/2688#issuecomment-2214638068, the only workaround for now is to add /
into nitro.prerender.routes
or routeRules
@farnabaz Thank you for your explanation. If this is expected by the team, then it’s fine! Should I close this issue?
However, wouldn't it be better to highlight this point in the release log? For users, being able to identify potential issues from the release log could significantly reduce confusion.
@Mini-ghost Indeed it would be better if we add a note in docs or releases. This issue supposed to be fixed in latest Nuxt patch but still exists and waiting to be fixed in next patch.
Feel free to close the issue, I'll update release notes to note about regression
Thank you very much for your work. 🙌
Environment
Build Modules: -
Reproduction
N/A
Describe the bug
In @nuxt/content 2.13.0, when I run
nuxt generate
, it successfully builds all my static pages. However, after upgrading to 2.13.1, it only creates404.html
and200.html
along with other pages related to@nuxtjs/sitemap
.I found this is related to issue #2681. It seems the fix was intended to resolve an issue with
nuxt/i18n
, but it has disrupted the existing functionality. Is there a better approach? Would it be better to address this issue directly withinnuxt/i18n
?Currently, we need to add the following to
nuxt.config.ts
to continue working as expected:Additional context
No response
Logs
No response