-
Notifications
You must be signed in to change notification settings - Fork 393
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
Service worker not getting registered in localhost #82
Comments
Did you register the service worker here =>
|
yes I did, that's how I am able to add captured screenshot of live debugging |
I don't understand exactly. Can you do what you want with CRA and show me what output this boilerplate can't produce where in fact CRA can? |
https://github.com/varora1406/example-app I have enabled service worker as you mentioned, you can run PWA test from google chrome devtools to verify that service worker isn't registered despite the code change you mentioned Note: checkout latest commit of |
Reason is mentioned in facebook/create-react-app#10032 |
I see. I honestly don't know :( It's been so long I didn't test offline-first functionality. In fact, I just removed it from this project because it's not easy to test and I cannot guarantee a working example |
i have fixed it in my app |
Description
For localhost, service worker is not getting registered
Steps to reproduce
It's easy to reproduce in all apps versioning 1.0.2 of this template.
Expected behavior
Service worker should get registered
Screenshots
Reason - For production it should work as per code. For localhost we are checking for
service-worker.js
file on window.origin. Which doesn't exist because there is no such file exposed inbuild
folder when build is made.I wish I could run other typescript templates and see the difference.
Versions
The text was updated successfully, but these errors were encountered: