Disable workbox logging

How do I disable workbox logging for my production environment deployments on the XDN?

Internal ticket has been created to track the effort on this. Updates will be added as soon as possible
Ticket #: XDN-7903

at the top of your service-worker.js you can add:

self.__WB_DISABLE_DEV_LOGS = true

Full example:

import { skipWaiting, clientsClaim } from 'workbox-core'
import { precacheAndRoute } from 'workbox-precaching'
import { Prefetcher } from '@layer0/prefetch/sw'
self.__WB_DISABLE_DEV_LOGS = true

skipWaiting()
clientsClaim()
precacheAndRoute(self.__WB_MANIFEST || [])

new Prefetcher().route()
1 Like