Replies: 1 comment
-
After some research I found: In development mode, next-pwa creates a service worker that disables caching. It even tells me so on the console ;-):
When building the app via A bit hard to debug, so I tried to set |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I start using next-pwa and the basic setup worked like a charm. Now it want to play with the runtime caching option, which does not work for me:
My
next.config.js
includes the standard cache entries plus a custom one that should use the strategyStaleWhileRevalidate
for each request going to/api/todoitem
:Restart
npm run dev
fire up the browser, fetchGET /api/todoitem
and console.log tells meI tried a number of combinations of regexes, including
defaultRuntimeCaching
before or after my runtimeCache entry to no avail.Any hints to get custom runtimeCache rules worling would be greatly appreciated.
next.js 12.0.7
next-pwa 5.4.4
node.js v14.18.2
Beta Was this translation helpful? Give feedback.
All reactions