firebase-tools
firebase-tools copied to clipboard
Support NextJS on-demand revalidation
[REQUIRED] Environment info
firebase-tools: 11.25.3
Platform: macOS
[REQUIRED] Test case
Starting with v12.2.0, Next.js supports On-Demand Incremental Static Regeneration to manually purge the Next.js cache for a specific page. This makes it easier to update the site, however it seems firebase hosting does not detect on demand regeneration.
[REQUIRED] Steps to reproduce
Following the steps in this guide add the on demand revalidation (https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration#on-demand-revalidation) api path.
[REQUIRED] Expected behavior
Upon invoking the revalidation api route, the hosting should regenerate a new page.
[REQUIRED] Actual behavior
The hosting never regenerates the page matter how many time the api route is called. And the stale page remains and is continued to be served to users.