I want to disable the workbox log in development mode.
Even putting it as true, it still keeps showing up.
Steps to reproduce the behavior:
I need the debug to be removed by adding true to __WB_DISABLE_DEV_LOGS

Use disable for development
module.exports = withPWA({
future: {
webpack5: true
},
pwa: {
disable: process.env.NODE_ENV === 'development',
dest: 'public'
}
})
Can you first try next-pwa 5.1.3?
I am encountering this issue too. I am using next-pwa 5.1.3.
Try another way, set in your pwa config: mode: 'production'
Thank you for your response. It's not working.
Here's my PWA config.
pwa: {
disable: process.env.NODE_ENV === 'development',
register: true,
dest: 'public',
runtimeCaching,
mode: 'production'
}
I could reproduce this error. But it works perfectly after I clean everything up and rebuild under development mode. I think you can fix this too.
yarn dev or nextworker/index.js or worker/index.ts and add self.__WB_DISABLE_DEV_LOGS = true on the top of the file..next folderyarn devApplication tab in development tools, click 'Clear site data', then right click the refresh button and click 'Empty Cache and Hard Reload'
@EpicHigh tips for your pwa config, you should update your config to this: (minimal is enough)
pwa: {
dest: 'public'
}
Wow, I appreciate that. Thank you for your help. It's work as expected.
@shadowwalker Thanks :)
Most helpful comment
I could reproduce this error. But it works perfectly after I clean everything up and rebuild under development mode. I think you can fix this too.
yarn devornextworker/index.jsorworker/index.tsand addself.__WB_DISABLE_DEV_LOGS = trueon the top of the file..nextfolderyarn devApplicationtab in development tools, click 'Clear site data', then right click the refresh button and click 'Empty Cache and Hard Reload'@EpicHigh tips for your pwa config, you should update your config to this: (minimal is enough)