Support disabling ISR for the entire application #42207
brandonchinn178
started this conversation in
Ideas
Replies: 1 comment 4 replies
-
@balazsorban44 can you explain why this was converted into a discussion? What types of things should be an issue and what should be a discussion? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Moved from discussion: #23917
Describe the feature you'd like to request
I would like to disable ISR in a test environment, e.g. when I'm running CYPRESS. Today, I could fix it by adding
revalidate: DISABLE_ISR ? 1 : <original_time>
to all of my pages using ISR, but it would be better to have a global configuration that tells all of my pages to refetch data from the server.This would still be an issue with the new data fetching mechanism in NextJS 13, because you'd still have to do this in every
fetch
call withrevalidate
specified (and would even be worse because you could have multiplefetch
calls withrevalidate
in a single page, as opposed to thegetStaticProps
method, which specifies onerevalidate
for the whole page)Describe the solution you'd like
Add a
disableISR
key tonext.config.js
that I can set usingprocess.env.DISABLE_ISR
(which I can set in CI).Describe alternatives you've considered
Can't think of any alternative solutions.
Beta Was this translation helpful? Give feedback.
All reactions