1.1.0 • Published 2 years ago
@ducanh2912/next-sw v1.1.0
NOTE: This package is not ready at the moment. Please use
@ducanh2912/next-pwainstead.
Zero-config PWA plugin for Next.js
This 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 use
create-next-appto 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/workboxlessto create a new Next.js app using thebasicexample))
NOTE 1 -
next-pwaversion 2.0.0+ should only work withNext.js9.1+, and static files should only be served through thepublicdirectory.NOTE 2 -
@ducanh2912/next-swcurrently doesn't support Turbopack, but I will start working on it as soon as we get our hands on Turbopack.
How is it different from @ducanh2912/next-pwa?
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.