Facing an odd issue with ISR in Next. Pages with params (in Plasmic) are not being regenerated when deployed on Vercel. Static pages from Plasmic regenerate fine. No such issue with a build on the localhost, however. All pages revalidate as expected.
Hi @spiritual_mosquito, when you say ISR, are you using time-based or on-demand ISR (where you’re calling revalidate())?
In case it’s the latter, you have to pass the exact final URLs to invalidate, so for a page like
/posts/[slug], you have to invalidate
If by localhost you are referring to dev server, it always refreshes and never caches.
In case none of these helps - do you see the same issue with a fresh create-plasmic-app as well?
HI @yang thanks for the reply. I’m talking about time based revalidation. When I say localhost, I’m doing a
start on my computer. It works as expected. But it doesn’t regenerate the page when on Vercel. Again, Plasmic only pages do regenerate on their as well, only the ones with page params don’t.
Hmm, ISR should be under the control of your next code base and not plasmic. If you take your parameterized page files in the next JS code base, and remove plasmic from them and replace these with just some dummy hard-coated content, do you see the same issue?
The above is assuming you have some specific files for the dynamic route pages, but if you’re using a single catch-all for rendering all plasmic pages, then do you see the same issue if you start from a brand new create plasmic app?
They’re all being done with a catchall. I don’t have separate files for these pages.
Hmm. That would be difficult to try, our code is pretty intertwined with the pages now. Code components n all. If it helps, I updated all packages (but antd) to the latest available versions.
I could try create plasmic app and transferring all code over, is that what you mean?
You shouldn’t need to do much work - if you just create-plasmic-app and point it at your project ID, then it will just render pages without your code components
I just tried it right now with I think one of your sites and it does seem to be auto-refreshing the pages when I set the revalidate to 10 seconds
I sent you a video demonstration of the issue in a private message