Nuxt Content prerendering page force XHR request to the /api/_content/... when using nuxt build on Netlify.
Navigation between content pages is slowed down due to that behavior.
I do not have issues with nuxt generate or nuxt build --prerender Nuxt Content is properly pre-rendered with the pages: in that case, navigation between pages is instant.
But in my case, I must deploy using nuxt build to have the server function deployed as well for some landing page API usages.
Also tried some configuration to force the pre-rendering of those Nuxt Content pages: /manifesto and /policies/**, but it doesn't prevent the navigation to those pages from triggering that XHR :(
I would really like to have this content fetching at built time.
IMPORTANT EDIT:
When visiting one of my Nuxt Content pages on production by accessing the URL directly, that XHR is not triggered, but the content seems to appear. So, somehow, it seems that the page has been pre-rendered, but navigating between pages still triggers the content fetching even tho it doesn't need it.
Example: accessing the page https://.../manifesto, show the content properly without XHR. Accessing manifesto from the homepage, will trigger that request...
Environment
Darwin
v16.17.0
3.6.5
2.5.2
npm@9.8.1
vite
-
-
-
Reproduction
No reproduction repo available, sorry
Describe the bug
Nuxt Content prerendering page force XHR request to the
/api/_content/...
when usingnuxt build
on Netlify. Navigation between content pages is slowed down due to that behavior.I do not have issues with
nuxt generate
ornuxt build --prerender
Nuxt Content is properly pre-rendered with the pages: in that case, navigation between pages is instant.But in my case, I must deploy using
nuxt build
to have the server function deployed as well for some landing page API usages.Also tried some configuration to force the pre-rendering of those Nuxt Content pages:
/manifesto
and/policies/**
, but it doesn't prevent the navigation to those pages from triggering that XHR :(I would really like to have this content fetching at built time.
IMPORTANT EDIT: When visiting one of my Nuxt Content pages on production by accessing the URL directly, that XHR is not triggered, but the content seems to appear. So, somehow, it seems that the page has been pre-rendered, but navigating between pages still triggers the content fetching even tho it doesn't need it. Example: accessing the page
https://.../manifesto
, show the content properly without XHR. Accessing manifesto from the homepage, will trigger that request...Thank you!
Additional context
nuxt.config.ts
Network XHR sent, example
Manifesto Vue Template
Build Logs