disable workbox logs
-
Hi all,
Could someone please tell me how to properly disable / enable the workbox console log messages when developing in pwa mode?
I’ve scoured the internet and while I’ve found the docs for workbox and how they specify doing it, I’ve not found a correlating spot in quasar to implement it successfully.
Thank you,
Ken -
quasar.conf.js > pwa > workboxOptions
It’s in the docs too. -
Thank you. Yes I’ve seen that and many many other items regarding possible options, but none of these state how to specifically disable the logging. Prior to the 1.0xbeta I would have to edit one of the workbox files located in the node_modules source to change the log_level. Since the update this is no longer working. So I guess I am trying to find if anyone has a specific setting or details on how to do this withing the quasar framework.
Thanks again,
Ken -
I think I may have figured out how to do it in Quasar. It appears to be disabled after I uncommented the workboxPluginMode: ‘InjectManifest’ in the quasar.conf.js and then put the following in the src-pwa/custom-serviceworker.js
workbox.setConfig({
debug: false,
});That seems to have done it. Once we get to needing all the information that workbox provides we can set it to true, however, during our current development phase, it is just a lot of noise.
Hope this helps someone else.
-
I have tried your suggestion, but this is not working for me. And a really odd (and annoying) bug seems to be that if I switch back to just a regular SPA, it STILL shows those workbox logs. I can’t get rid of them without completely deleting the pwa folder. Any suggestions?
-
@ssuess Did you ever find a solution? I’m running into the same thing. Interestingly, I don’t see the workbox items in the console on Chrome or Edge. But in Firefox, I see them even though I’m running dev in SPA mode (as another console log confirms).
-
@bfreed oddly in latest versions of Quasar, that workbox debug setting seems to be working. I am running in PWA mode which would use a serviceworker, whereas SPA would presumably not. However, I also had to clear my browser cache to get these messages to stop, so you might try that in each browser where you see them.
-
@ssuess said in disable workbox logs:
@bfreed oddly in latest versions of Quasar, that workbox debug setting seems to be working. I am running in PWA mode which would use a serviceworker, whereas SPA would presumably not. However, I also had to clear my browser cache to get these messages to stop, so you might try that in each browser where you see them.
it’s works for me.
-
Does anyone know if it is possible, in the current versions of quasar to setconfig debug to false (in
quasar.conf.js
)without using a custom service worker file?I have tried the following, none of which work:
workboxOptions: { debug: false, skipWaiting: true, clientsClaim: true }
workboxOptions: { skipWaiting: true, clientsClaim: true, setConfig({ debug: false }) }
workboxOptions: { skipWaiting: true, clientsClaim: true, debug: false }