Replies: 3 comments
-
@djimnz have you found a solution for this? I'm looking to do the same. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Same issue |
Beta Was this translation helpful? Give feedback.
0 replies
-
same here |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I imported Nuxt Content into an existing Nuxt 3 project and could add my content correctly. Obviously, pages transition are pretty fast on local. But when deployed, it doesn't prerender the pages correctly.
Context
My deploy config uses
nuxt build
with some routesRules configurations to pre-render my homepage and content.I have to use
nuxt build
for deploying on Netlify because I need the backend API server function for my email catcher form (If you have an idea on how I can have the server function deployed as well withnuxt generate
, I will be glad to hear it).My homepage is properly pre-rendered with its content from Contentful (Contentful content is fetched at built time). But each time I'm navigating via NuxtLink to my Nuxt Content pages
/manifesto
and/policies/**
, it need to call the backend server function to get its content, such as this GET example from the browser network tab:Here is my
nuxt.config.ts
configuration:Page component
pages/policies/[...slug].vue
:Questions
How to make my Nuxt Content get its content at build time using
nuxt build
and remove the needs of my app to load it between navigations? As you can see, I have tried to add them onrouteRules
andnitro.prerender
config, but none of them seem to give me the result I'm looking for.Not related to Nuxt Content, but someone know how to still have the server function deployed even if I'm using
nuxt generate
as my deployment build method? When usingnuxt generate
all my pages are blazing fast, and Nuxt Content page already have all the required content - no need to round-trip with the backend. But then, I cannot use my Nuxt API endpoints :(Thank you so much for your reading time and your feedback.
Beta Was this translation helpful? Give feedback.
All reactions