I recently started to learn PWA, specifically Service Workers. Following the official docs I created next.config.js, copied the basic config code there and launched npm run dev (4 files were successfully generated in public folder). The browser shows blank page, console shows many failed requests. It happens in offline mode.
By default, PWA functionality is limited running in dev mode, this is by design. If you want to see offline working, try running in production mode with next start.
Summary
I recently started to learn PWA, specifically Service Workers. Following the official docs I created next.config.js, copied the basic config code there and launched npm run dev (4 files were successfully generated in public folder). The browser shows blank page, console shows many failed requests. It happens in offline mode.
Versions
next-pwa
: ^5.2.23next
: ^11.0.1How To Reproduce
Steps to reproduce the behavior:
Expected Behaviors
App should work offline.
Screenshots