Ops app (Vue/Quasar PWA) with dispatch V2 integration, tag system, customer 360, tickets, and dashboard. Served via standalone nginx container at erp.gigafibre.ca/ops/ with Traefik StripPrefix + Authentik SSO. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
762 B
JavaScript
27 lines
762 B
JavaScript
/* eslint-env serviceworker */
|
|
import { clientsClaim } from 'workbox-core'
|
|
import { precacheAndRoute, cleanupOutdatedCaches, createHandlerBoundToURL } from 'workbox-precaching'
|
|
import { registerRoute, NavigationRoute } from 'workbox-routing'
|
|
|
|
self.skipWaiting()
|
|
clientsClaim()
|
|
|
|
// Listen for skip waiting message from register-service-worker
|
|
self.addEventListener('message', (event) => {
|
|
if (event.data && event.data.type === 'SKIP_WAITING') {
|
|
self.skipWaiting()
|
|
}
|
|
})
|
|
|
|
precacheAndRoute(self.__WB_MANIFEST)
|
|
cleanupOutdatedCaches()
|
|
|
|
if (process.env.MODE !== 'ssr' || process.env.PROD) {
|
|
registerRoute(
|
|
new NavigationRoute(
|
|
createHandlerBoundToURL(process.env.PWA_FALLBACK_HTML),
|
|
{ denylist: [/sw\.js$/, /workbox-(.)*\.js$/] }
|
|
)
|
|
)
|
|
}
|