Closed Talent30 closed 1 year ago
https://developer.mozilla.org/en-US/docs/Web/API/Request/cache
Please consider the following example. When we set cache option ky doesn't work as expected in Next.js but wretch does.
How to reproduce: npm run build
npm run build
Expected behaviour Next.js shouldn't fetch during build
https://codesandbox.io/p/sandbox/polished-thunder-x35x7z?file=%2Fapp%2Fpage.tsx&selection=%5B%7B%22endColumn%22%3A13%2C%22endLineNumber%22%3A22%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A20%7D%5D
Ky simply passes that option to Fetch. So if you have a problem with it, it is a problem with Fetch or the Fetch polyfill you use.
Thank you @sindresorhus
https://developer.mozilla.org/en-US/docs/Web/API/Request/cache
Please consider the following example. When we set cache option ky doesn't work as expected in Next.js but wretch does.
How to reproduce:
npm run build
Expected behaviour Next.js shouldn't fetch during build
https://codesandbox.io/p/sandbox/polished-thunder-x35x7z?file=%2Fapp%2Fpage.tsx&selection=%5B%7B%22endColumn%22%3A13%2C%22endLineNumber%22%3A22%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A20%7D%5D