Skip to content

Register the service worker in development #340

@sk22

Description

@sk22

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
The service worker only gets registered in production and when the https is used

What is the expected behavior?
I'd expect preact-cli to also register a service worker in development. On localhost, service workers are also supported without http, so why not? Web Fundamentals, MDN

If this is a feature request, what is motivation or use case for changing the behavior?
This would add the ability to test the service worker in development.

https://github.com/developit/preact-cli/blob/master/src/lib/entry.js#L3

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