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.
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.
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.
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 .
I resolved this by doing the following:
registerServiceWorker.js
fileregisterServiceWorker.js
from main.js
.PWA
plugin from the devDependencies
in package.json
. If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With