jeudi 4 juin 2020

How to enable debug mode by generating service worker file from workbox cli?

I'm trying to enable my workbox config to debug mode

Usually I just have to set the config in my sw.js file like this

workbox.setConfig({
  debug: true,
});

But because now I'm using generateSW form workbox-cli, I can't set the debug to true

I've tried to configure my workbox-config.js file like this

module.exports = {
  "globDirectory": "./",
  "globPatterns": [
    "**/*.{css,ico,png,html,js,json}"
  ],
  "swDest": "sw.js",
  "debug",true
};

But it doesn't work




Aucun commentaire:

Enregistrer un commentaire