Next.js Discord

Discord Forum

Draft mode being reset on page load while running locally

Unanswered
Multiply posted this in #help-forum
Open in Discord
Is there a reason the workers that are spawned by Next.js are not sharing prerender manifest via .json (as in prod builds)?

Currently you can't reliably use draft mode while running locally, when you have a custom server. They use different unique ids for preview, so when it's enabled in an API route, it'll clean up the __prerender_bypass cookie as it doesn't match the other workers.

1 Reply

I've commented on an issue related to it here, for more context: https://github.com/vercel/next.js/issues/52080#issuecomment-1943147703