playwright-community/ssr

Known limitation: Next.js requires fetchCache = 'no-cache'

Opened this issue · 0 comments

Next.js caches fetch() requests quite aggressively, they do this by overriding fetch().

In order to prevent it from caching, you can either pass cache: 'no-cache' to the fetch() params or do export const fetchCache = 'default-no-store' inside each page.

There is no way of doing this globally, which would require a Next.js change, otherwise each file would look like this, maybe with a conditional if or utility function.

Filed upstream as vercel/next.js#63371.