ISR Not Working on Astro When Deployed to Vercel

When using Astro with Vercel and enabling ISR, I expect pages to:

  • Revalidate after the configured expiration time.
  • Serve stale content during regeneration.
  • Eventually return a fresh version.

However, in both tested configurations(below), the pages remain fully static and never revalidate, even after several minutes and repeated requests.

Config 1: (per Vercel docs)

// astro.config.mjs
export default defineConfig({
  output: "server",
  adapter: vercel({
    isr: {
      expiration: 60,
    },
  }),
});
// src/pages/test-isr.astro
export const prerender = true;

Config 2 (per legacy Astro docs)

// astro.config.mjs
export default defineConfig({
  output: "server",
  adapter: vercel({
    isr: true,
  }),
});
// src/pages/test-isr.astro
export const prerender = { expiration: 60 };

In both cases, the page is cached once and never revalidates, even after 60+ seconds. Timestamps show no change across multiple repeated visits.

Steps to Reproduce

  • Create an astro page:
---
export const prerender = true;
const now = new Date().toISOString();
---
<html>
  <body>
    <h1>ISR Test</h1>
    <p>Rendered at: {now}</p>
  </body>
</html>
  • Deploy to Vercel with the above astro.config.mjs configs
  • Load the page
  • Wait >60 seconds
  • Refresh the page

Actual result:

  • Page shows the same timestamp
  • x-vercel-cache always reports HIT
  • No REVALIDATED or STALE behavior observed

Would really appreciate help understanding if I missed something in the configs issue or a known limitation or a bug in the current ISR support for Astro on Vercel. Thanks!

Reference Docs