Hi Piotr thank you for taking the time to write this. I'm in the same situation - I need to debug the service worker as I'm using it for other background code apart from caching and the dev setup disables the service worker. In the second part of the "Fixing SW on prod" section, you mentioned removing all references to serviceworker-webpack-plugin - but after doing this the DEV server service worker stops working.
I did try to import the Dev service worker manually in main.js but after launching npm run serve, it fails with a 404
Have you encountered this as well? Was there any workaround that worked for you?
Hi Piotr thank you for taking the time to write this. I'm in the same situation - I need to debug the service worker as I'm using it for other background code apart from caching and the dev setup disables the service worker. In the second part of the "Fixing SW on prod" section, you mentioned removing all references to serviceworker-webpack-plugin - but after doing this the DEV server service worker stops working.
I did try to import the Dev service worker manually in main.js but after launching npm run serve, it fails with a 404
Have you encountered this as well? Was there any workaround that worked for you?
Hi Ang,
Have you tried the first method to fix the production service worker? I.e.
I must say I had some problems with getting this to work as well and personally decided on using this method