-
Notifications
You must be signed in to change notification settings - Fork 2
[PWA] Disable workbox console messages #5
Comments
The |
The version of workbox is updated in the alpha version of the PWA plugin. I have tested on that alpha version and adding self.__WB_DISABLE_DEV_LOGS = true; disables the workbox logs properly. |
PR for this issue blocked because of #6 (comment) |
This we will keep open until the Workbox updates to latest version in PWA plugin. |
The latest version of PWA by default disables the dev logs and Setting |
Correct. Closing this as new release of PWA plugin has latest Workbox JS which solves this issue. |
Workbox use
WP_DEBUG
constant to detectDev
orProd
. So if we haveWP_DEBUG
log true andWP_DEBUG_DISPLAY
asfalse
, it will log errors/messages in console by default.https://github.com/GoogleChrome/workbox/blob/6845f53c0053a4f162475d678bbd7a9e385b53d0/packages/workbox-core/src/_private/logger.ts#L24
Need to inject this script in the service worker through PWA plugin filters. As specified here - GoogleChrome/workbox#2296
self.__WB_DISABLE_DEV_LOGS = self.__WB_DISABLE_DEV_LOGS || false;
The text was updated successfully, but these errors were encountered: