eleventy-plugin-pwa icon indicating copy to clipboard operation
eleventy-plugin-pwa copied to clipboard

disabling workbox logging

Open mvolkmann opened this issue 4 years ago • 1 comments

According to this page, I think I should be able to disable workbox logging by setting the "mode" option to "production":

https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.generateSW

But when I include this in the function exported by .eleventy.js it says "mode" is not a supported parameter":

  eleventyConfig.addPlugin(pwaPlugin, {
    swDest: './_site/service-worker.js',
    globDirectory: './_site',
    mode: 'production'
  });

Do you know how I can disable the workbox logging that appears in the DevTools console?

mvolkmann avatar Apr 11 '20 21:04 mvolkmann

@mvolkmann the page you are referring to is for version 5.1.2 of the workbox-build module.

eleventy-plugin-pwa uses version 4.3.1, which has less options, the options for version 4.3.1 can be found here.

In order to use all the options listed online you would have to fork this repo and upgrade the workbox-build dependency to the latest version 5.1.4.

pvds avatar Sep 19 '20 09:09 pvds