Next.js PWA offline capability with Service Worker, no extra package
In this tutorial, we’ll add offline support to a Next.js PWA with service worker and cache without extra packages, so no next-pwa, no next-offline, no Swiss, just plain ts.
Why you may want to do it First, because this is not a super complex task and so is a perfect opportunity to play with service workers and cache, hopefully removing a little of the overwhelming feeling that usually arises when talking about the subject.