Why is my site using SSR?
Answered
Argente Brun posted this in #help-forum
Argente BrunOP
I can't fathom why my site isn't using SSG. The deployment logs show that it's SSG, however I can see my console.log in Vercel logs for every request.
I can also see GQL requests hitting my CMS backend, although there's no requests for these in the Vercel logs.
Am I misunderstanding how SSG works on Vercel? Are pages built multiple times so they can be distributed across the edge network or something?
In any case I would have thought the GQL requests would be stored in the data cache
I can also see GQL requests hitting my CMS backend, although there's no requests for these in the Vercel logs.
Am I misunderstanding how SSG works on Vercel? Are pages built multiple times so they can be distributed across the edge network or something?
In any case I would have thought the GQL requests would be stored in the data cache
Answered by Argente Brun
It seems that it was because I was explicitally using
export dynamic = 'auto', removing that makes it ssg as expected! I assumed that would be the same but apparently not11 Replies
Argente BrunOP
Just to add that I'm using
export dynamic = 'auto' in my root layout, and the only dynamic functions I'm using are only use when nextjs draftMode is enabledArgente BrunOP
It seems that it was because I was explicitally using
export dynamic = 'auto', removing that makes it ssg as expected! I assumed that would be the same but apparently notAnswer
Argente BrunOP
Issue here: https://github.com/vercel/next.js/issues/65799
@Argente Brun I can't fathom why my site isn't using SSG. The deployment logs show that it's SSG, however I can see my console.log in Vercel logs for every request.
I can also see GQL requests hitting my CMS backend, although there's no requests for these in the Vercel logs.
Am I misunderstanding how SSG works on Vercel? Are pages built multiple times so they can be distributed across the edge network or something?
In any case I would have thought the GQL requests would be stored in the data cache
does accessing
/contact repeatedly also make request to your cms backend?@ᴉuɐpɹɐɐ does accessing `/contact` repeatedly also make request to your cms backend?
Argente BrunOP
It does indeed. It turns out I was being opted into dynamic rendering, though I'm still not really sure why the fetches results didn't persist in the nextjs data cache
thats odd
are you sure the build logs are really the latest build logs?
Argente BrunOP
yep, i can see the backend requests coming in in the nginx logs in papertrail