Example site: https://helpful-choux-0def3a.netlify.app
Repo: GitHub - dgrayvold/netlify-nuxt-4-tests
In the example site there are two routes (/
and /test
) that are both set to be prerendered through nuxt.config.ts
’s routeRules
property. However, when navigating to the routes on the deployed site, I can see in my function logs that both cause invocations of the server handler
function. The load times of the pages generally feel longer than I’d expect for simple HTML as well, hinting that the functions are running before serving them.
In this blog post it’s stated that:
- Nuxt hybrid rendering (AKA route rules) now fully works out of the box: for example, set
"/blog/**": {prerender: true}
in your Nuxt config’srouteRules
and those pages will be prerendered at build time and excluded from function invocations.
I have future: { compatibilityVersion: 4 }
and compatibilityDate: 2025-03-29
set in the config as mentioned in the post as well. Is there some other piece I’m missing to get it to work?
Thanks in advance!