Hi,
Do you have a solution or work-around for previews for static pages (e.g. with export const dynamic = "force-static";) in nextjs 14 using the app router?
Thanks,
Hi,
Do you have a solution or work-around for previews for static pages (e.g. with export const dynamic = "force-static";) in nextjs 14 using the app router?
Thanks,
Hi @d.mullan, previews use Next.js' Draft Mode feature which enables dynamic rendering. If you force static rendering using export const dynamic = "force-static"
, pages will always be static, thus not allowing Draft Mode or previews.
We do not have a workaround, and we generally do not recommend using the "force-static"
option.
Instead, we recommend configuring your network requests with the cache
option accordingly and using dynamic APIs only where needed. By default, Prismic sites are configured to cache all Prismic requests: Fetch Data in Next.js - Documentation - Prismic
Let me know if you have any questions about configuring your app in this way.