How can I turn a React application into a PWA?
I am currently using a React application with Vite and I want to turn it into a PWA by implementing a customized popup for users to download the application. I have attempted a few solutions, but the service worker is not registering and I am only able to access the PWA on desktop and not mobile devices. I am using a vite-plugin-pwa and need assistance in resolving this issue. Can anyone help me sort this out?
6 Replies
you'll have to post a lot more info. code, error messages, things you've tried to fix those error messages, that kind of stuff.
Hi Jochem sorry for not giving more info I'll be sharing more info on it.
This is how i tried to build registering the service worker & before prompt in App.jsx and in vite config made the workbox cache the file
@Jochem Could you please check this and correct any errors and give the possible way to make the pwa?
Sorry, not really my expertise. Just trying to get more info for others that might have an answer
This sounds good to me. Thank you for your help!