Turn next.js web app into PWA?
Unanswered
English Lop posted this in #help-forum
English LopOP
Had anyone turned their nextjs web app into a PWA? How difficult was it? Why did you need the PWA? Considering it and would like to know what the process is like or obstacles encountered. I know next has documentation on this.
12 Replies
@English Lop Had anyone turned their nextjs web app into a PWA? How difficult was it? Why did you need the PWA? Considering it and would like to know what the process is like or obstacles encountered. I know next has documentation on this.
If you specifically want to just have an install button and have it work like a website in a new window, stupidly easy
(I did it at work and had almost no problems)
If you want PWA specific things (offline loading, etc.) it takes a lot more work
Assuming all you want is the easy method, I just created a manifest.json in public, included that in the layout.tsx under head, and made a tiny sw.js file based on MDN
Keep in mind also, chrome will, in devtools, tell you what's wrong with the manifest/sw and how to fix it under the Application tab
-# Firefox may do this too; but I haven't tried because I exclusively use chrome at work
English LopOP
Thank you. I should get clarity from management as to the requirements (offline loading, notifications...). When you say have it work like a website in a new window, you mean install both in mobile and desktop, right? What was the benefit for your specific use case?
@Pinea If you want PWA specific things (offline loading, etc.) it takes a lot more work
English LopOP
And did it work for MacOS?
@English Lop And did it work for MacOS?
No clue, to be honest I've never used a Mac
For me specifically, I'm making a CRM for the company. Because it's not really used by people who are too technical, I just wanted to give the option to have the site specifically on the taskbar
(We have a current system that's just some UI on top of an Access database, which keeps breaking, so as the new guy I was asked to make a new version with a better database, which ofc means we cant use Access stuff)
So like, inherently this was only designed to run on Windows computers