https://github.com/hanford/next-offline
It seems like next-offline is the official solution which makes me a bit more inclined to use that.
So I'm wondering how is this library different (or rather, better) than next-offline?
Hi, as far as I know, there is no "official" solution for next.js yet. next-offline is another third party plugin for build PWA with next.js. It has an example in next.js repo, I tried to send a pull request to add my example with next-pwa before. But it's rejected due to next.js may put pwa support on their roadmap in the future.
Anyway, please feel free to try out both library and pick any one you like.
Features of next-pwa have been listed in the README, and this library is more opinionated (with presets of workbox configurations) and aims to be as simple as possible for users.
next-offline VS next-pwa comparison can be found in the discussions for next.js: https://github.com/vercel/next.js/discussions/13810
Most helpful comment
Hi, as far as I know, there is no "official" solution for
next.jsyet.next-offlineis another third party plugin for build PWA withnext.js. It has an example innext.jsrepo, I tried to send a pull request to add my example withnext-pwabefore. But it's rejected due tonext.jsmay put pwa support on their roadmap in the future.Anyway, please feel free to try out both library and pick any one you like.
Features of
next-pwahave been listed in the README, and this library is more opinionated (with presets of workbox configurations) and aims to be as simple as possible for users.