Skip to content

Service worker debug logging is suppressed even during local development #128

@robbytx

Description

@robbytx

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()
  }
  ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions