Next.js Discord

Discord Forum

Conditional revalidate export

Unanswered
Chausie posted this in #help-forum
Open in Discord
ChausieOP
Is there any workaround to get this behaviour?

export const revalidate = process.env.NEXT_PUBLIC_PRODUCTION === 'true' ? 3600 : 0;


I have two environments, one for my CMS (which should show instant updates) and production, I'm getting this error from the example above: Unsupported node type "ConditionalExpression" at "revalidate".

0 Replies