Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register the service worker in development #340

Closed
sk22 opened this issue Aug 24, 2017 · 3 comments
Closed

Register the service worker in development #340

sk22 opened this issue Aug 24, 2017 · 3 comments

Comments

@sk22
Copy link

sk22 commented Aug 24, 2017

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

@gnapse
Copy link

gnapse commented Dec 20, 2018

Any word on this? It'd be cool.

@prateekbh
Copy link
Member

if you do preact build and serve the build folder on localhost. It will install the service worker.

@ForsakenHarmony
Copy link
Member

we have a dev service worker now, if you want something specific, please add a new issue for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants