Disable PWA plugin in Vue CLI 3

Justin Kahn picture Justin Kahn · Oct 14, 2018 · Viewed 8.2k times · Source

I'm having some issues with caching my files using the default service worker that comes with VueCLI 3. I would prefer to just use the default browser caching mechanism, but can't seem to disable the PWA plugin as its not in the vue.config.js file. Passing a blank object to the pwa option doesn't work either as the object is merged and not overwritten.

Answer

Justin Kahn picture Justin Kahn · Oct 14, 2018

I resolved this by doing the following:

  1. Removing the registerServiceWorker.js file
  2. removing the import of registerServiceWorker.js from main.js.
  3. removing the PWA plugin from the devDependencies in package.json.