You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get information about the cli-plugin-pwa.
I have a vuejs project using cli-plugin-pwa added by vue add pwa and i'm facing an issue about service-worker.js on production.
The issue is :
Error during service worker registration: TypeError: ServiceWorker script at https://faq.greenponik.com/service-worker.js for scope https://faq.greenponik.com/ threw an exception during script evaluation.
My service-worker.js is reachable and contains:
importScripts("/precache-manifest.20a6ce74c24b125cc57f89fde8de5429.js", "https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
if (workbox) {
console.log(`Workbox is loaded`);
workbox.clientsClaim();
// The precaching code provided by Workbox.
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.suppressWarnings();
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.core.setCacheNameDetails({ prefix: "waterbrain" });
}
else {
console.log(`Workbox didn't load`);
}
self.addEventListener('message', (event) => {
if (event.data && event.data.type === 'SKIP_WAITING') {
self.skipWaiting();
}
});
my initial service-worker.js is on the src/folder from the project.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to get information about the cli-plugin-pwa.
I have a vuejs project using cli-plugin-pwa added by vue add pwa and i'm facing an issue about service-worker.js on production.
The issue is :
My service-worker.js is reachable and contains:
my initial service-worker.js is on the src/folder from the project.
II read the doc https://cli.vuejs.org/core-plugins/pwa.html and search on many tuto or forum but i don't find any solution about this error.
Beta Was this translation helpful? Give feedback.
All reactions