How to turn a Next.js app into a PWA using next-pwa plugin:
Install
next-pwayarn add next-pwaUpdate
next.config.jsconst withPWA = require('next-pwa')({ dest: 'public' }) // ... module.exports = withPWA(nextConfig)Create a
.webmanifestfile and place it in thepublicdirectoryAdd a
<link>tag to the<head>ofpages/_document.js<link rel="manifest" href="/manifest.json">