NOTE: This package is not ready at the moment. Please use
@ducanh2912/next-pwa
instead.
PWA plugin for Next.js
Zero-configThis plugin is powered by Service Worker and other good stuff.
Features
0️⃣ Zero-config for registering and generating service worker out of the box✨ Optimized precaching and runtime caching (in progress)💯 Maximal Lighthouse score (not guaranteed for now)🎈 Easy-to-understand examples📦 Uses Service Worker🛠 Configurable (more in future!)🚀 Spin up a GitPod and try out examples in rocket speed (or usecreate-next-app
to create a brand new Next.js app with them (for example, runpnpm create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/workboxless
to create a new Next.js app using thebasic
example))
NOTE 1 -
next-pwa
version 2.0.0+ should only work withNext.js
9.1+, and static files should only be served through thepublic
directory.NOTE 2 -
@ducanh2912/next-sw
currently doesn't support Turbopack, but I will start working on it as soon as we get our hands on Turbopack.
@ducanh2912/next-pwa
?
How is it different from It directly makes use of the ServiceWorker
API instead of workbox
. Both are supported, so just make a pick! If you are not sure, you may want to use @ducanh2912/next-pwa
instead as it allows you to customize your service worker further.