Custom Service Worker without requesting google
-
Hi everyone
I implemented a pwa following https://quasar.dev/quasar-cli/developing-pwa/configuring-pwa. Using the InjectManifest mode or the default mode, both make request to google servers. I want to avoid that since it lets google track my users.
The generated service-worker.js file contains the following problematic line:
importScripts("precache-manifest.870d42406272213b6d5be017dabe759a.js", "https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
How can I serve these dependencies without using the CDN?
Thx for your help
-
There is a workbox option importWorkboxFrom. Look at the doc it may help you https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin
-
Yeah thx that solved it