Problem
During local development (using ember serve or ember build without --environment production), the Workbox service worker output is built without logging enabled. This appears to be due to the fact that the Workbox mode option defaults to production (reference), and this plugin does not set the mode option.
Desired Behavior
IMHO this plugin should pass the current Ember environment as the value for the mode option by default here.
The only hesitation I see to doing this is if the Workbox debug logging is too verbose, in which case one can set disableDevLogs: true. If others prefer not to enable this, then I propose that the mode option should at least be documented in this project's README.
Workarounds
Run NODE_ENV=development ember serve (or build), or pass the option explicitly in ember-cli-build.js:
let app = new EmberApp(defaults, {
workbox: {
mode: EmberApp.env()
}
...
Problem
During local development (using
ember serveorember buildwithout--environment production), the Workbox service worker output is built without logging enabled. This appears to be due to the fact that the Workboxmodeoption defaults toproduction(reference), and this plugin does not set themodeoption.Desired Behavior
IMHO this plugin should pass the current Ember environment as the value for the
modeoption by default here.The only hesitation I see to doing this is if the Workbox debug logging is too verbose, in which case one can set
disableDevLogs: true. If others prefer not to enable this, then I propose that themodeoption should at least be documented in this project's README.Workarounds
Run
NODE_ENV=development ember serve(orbuild), or pass the option explicitly inember-cli-build.js: