You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@samcx please note that this workaround was provided by the NextJS team. Without export const dynamic = 'force-static' the page was always rendered on-demand (the Vercel-Cache header is always MISS).
Link to the code that reproduces this issue
https://github.com/joostmeijles/no-cookies-in-draftmode
To Reproduce
npm run dev
RequestCookies { _parsed: Map(0) {}, _headers: Headers {} }
Current vs. Expected behavior
Expected to have request cookies available when draft mode is enabled.
Note that removing
export const dynamic = 'force-static';
from https://github.com/joostmeijles/no-cookies-in-draftmode/blob/adb9d72554d42bf7f9d28d7b82c75104453265ca/app/page.tsx#L3 solves the issue, but this is not feasible as pages require ISR.Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local), Vercel (Deployed), next start (local)
Additional context
Inspecting request cookies in draft mode is necessary for properly functioning of the previewing in a CMS.
The text was updated successfully, but these errors were encountered: