3 ms·
Can you recommend any resources for setting up the service workers and manifest for a PWA?
by zach_garwood 4y ago
Can you recommend any resources for setting up the service workers and manifest for a PWA?
- jameal 4y agoMDN's web docs were instrumental. They have a nice guide[1]. Beyond that, their docs for the web APIs are great too. It was actually pretty easy, but I did get tripped up by the scope of the service worker. Initially I had the service worker js file in the `scripts` folder but it wouldn't work properly because the scope is by default relative to that file's location. I moved it to the root and that fixed my problem but you can also configure the scope when you register it[2]. [1]: https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps https://developer.mozilla.org/en-US/docs/Web/Progressive_web... [2]: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register https://developer.mozilla.org/en-US/docs/Web/API/ServiceWork...