Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable PWA plugin in Vue CLI 3

Tags:

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.

like image 971
Justin Kahn Avatar asked Oct 14 '18 08:10

Justin Kahn


People also ask

How do I remove a plugin from vue CLI?

Under "Dependencies" (second tab on the left of vue ui) you'll find all plugins listed. And on the right of each plugin there is a little trash icon, which removes the respective plugin.

Does vue support PWA?

Making your Vue app a PWA​ The two main requirements of a PWA are a Service Worker and a Web Manifest. While it's possible to add both of these to an app manually, the Vue CLI has some utilities for adding this for you. For existing projects, you can run the vue add command to install the PWA plugin for Vue.

How do I add PWA to vue?

Creating a new project with Vue CLI First, install Vue CLI. Choose Manually select features, and you'll see a list of à la carte options for your new app, including Progressive Web App (PWA) Support .


1 Answers

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.
like image 191
Justin Kahn Avatar answered Sep 20 '22 09:09

Justin Kahn