Conditional revalidate export
Unanswered
Chausie posted this in #help-forum
ChausieOP
Is there any workaround to get this behaviour?
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".
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".
1 Reply
@Chausie Is there any workaround to get this behaviour?
js
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".
no you cant do it like that. Tell us what you want to archive, so we can tell you, how you can archive that 🙂