Search code examples
vue.jsvue-cli-3

Disable PWA plugin in Vue CLI 3


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.


Solution

  • 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.