All Questions
49 questions
3
votes
2
answers
3k
views
Failed to load resources with vite pwa plugin in dev mode
I have a really simple vite app on which I try to use vite-pwa plugin in order to use it offline. It works well when building the app (npm run build and then npm run preview), but not in dev mode. ...
3
votes
0
answers
2k
views
Service-Worker not caching files with Vite + VitePWA
I got a service-worker.js that works fine with Webpack but now after migrating to Vite, the same service-worker.js is registered but not caching files and offline mode is not working (without any ...
5
votes
1
answer
527
views
Safari browser always sees an update to unchanged service worker
I've built a VueJS PWA and used register-service-worker to manage a service worker. I've built the app so when a new route is visited, it manually checks for an update to the service worker. If there ...
0
votes
1
answer
894
views
How can I overcome service worker's cache
A legacy app presents an issue with service worker cache preventing me from serving a new app.
short description:
Legacy app was written in Vue, with vite-plugin-pwa (zero config service worker). When ...
0
votes
0
answers
2k
views
Vite PWA plugin - add to home screen event
I'm trying to add an installable button to my PWA application. Everywhere I find information about beforeinstallprompt event but i cant listen it. I tried this code:
window.addEventListener("...
6
votes
2
answers
2k
views
PWA - Frontend doesn't update even after a hard refresh
Below is the configuration of our nuxt and nuxt-pwa configuration.
Nuxt pwa is recognising a new version available and we prompt user to do a hard refresh/reload.
And on reload - new UI also starts to ...
2
votes
0
answers
653
views
How to disable prefetch in VueJS PWA?
When you generate a PWA app using vue ui you can expect the following behavior.
All files you have in your dist folder are precached by browsers.
In other words, when you navigate to your app a ...
2
votes
0
answers
953
views
How to use service workers in Quasar Framework (Vue.js)
So i am building a mobile PWA built with capacitor for Android and iOS and i want to integrate a service worker to handle incoming push notifications from firebase while the app is closed. I followed ...
3
votes
2
answers
3k
views
Service worker not generated when building vue 3
I have installed "@vue/cli-plugin-pwa": "^4.5.12", in my package.json, I have also added workbox configuration in my vue.config.js. The problem is, when I'm building the project ...
-1
votes
1
answer
524
views
How to import localforage to service worker using importScripts?
I'm trying to import localforage to my service-worker.js file. I've read, you have to use
importScripts() to do so. Thing is I installed localforage in my Vue project using yarn and now i'm not sure ...
1
vote
0
answers
574
views
service worker Uncaught (in promise) TypeError: Failed to fetch in VueJS PWA
I've been trying to implement a service worker for my Vuejs PWA, and the code I have throws this error in the console right after the fetch event for my localhost URL, http://localhost:8080/
Uncaught (...
1
vote
1
answer
878
views
Vue PWA: Check if response was from cache and how old it is
I'm using vue-pwa for my site and am currently using the NetworkFirst strategy for an API that I call inside my site. I now want to somehow detect if the response I received from the API was cached by ...
2
votes
1
answer
448
views
TypeError: Failed to execute 'update' on 'ServiceWorkerRegistration': Illegal invocation
I have a VueJS app created using the CLI as a PWA. My service worker file looked like this:
/* eslint-disable no-console */
import { register } from 'register-service-worker'
if (process.env....
1
vote
1
answer
495
views
Can I have a PWA without caching any assets?
I want to use a PWA to allow my small app to be installable, but there is no real need for it to be 'offline ready' - it's a vue app that is constantly calling the server for data and it simply does ...
1
vote
1
answer
82
views
Is there a way to re-write my PWA from Vue to React and not break it for existing users?
I have a PWA built with Vue which hundreds of users use on a daily basis. There is, of course, a service worker which caches all of the static assets. Whenever a new release is pushed and deployed, a ...