This CLI tool enables you to quickly create a PWA on top of Next.js with zero config needed.
To create your Next.js powered PWA run
npx create-nextjs-pwa
Or clone this repo 🙂
This will create a basic Next.js template with additional files for PWA support.
These awesome features are possible thanks to the great - @shadowwalker, creator of next-pwa plugin.
- 0️⃣ Zero config for registering and generating service worker
- ✨ Optimized precache and runtime cache
- 💯 Maximize lighthouse score
- 🎈 Easy to understand examples
- 📴 Completely offline support with fallbacks example 🆕
- 📦 Use workbox and workbox-window v6
- 🍪 Work with cookies out of the box
- 🔉 Default range requests for audios and videos
- ☕ No custom server needed for Next.js 9+ example
- 🔧 Handle PWA lifecycle events opt-in example
- 📐 Custom worker to run extra code with code splitting and typescript support example
- 📜 Public environment variables available in custom worker as usual
- 🐞 Debug service worker with confidence in development mode without caching
- 🌏 Internationalization (a.k.a I18N) with
next-i18next
example - 🛠 Configurable by the same workbox configuration options for GenerateSW and InjectManifest
- 🚀 Spin up a GitPod and try out examples in rocket speed
- ⚡ Support blitz.js (simply add to
blitz.config.js
) - 🔩 (Experimental) precaching
.module.js
whennext.config.js
hasexperimental.modern
set totrue
Contributions are always welcome!