Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Provide a no-op SW that will be served by the dev environment. #2276
This adds in a "no-op"
It works around the issue of someone serving their dev and prod environments from the same port and ending up with a production service worker that controls their dev environment.
If a user finds themselves in that situation, then the next time the browser checks for an updated service worker, the "no-op" version will be installed instead, and immediately force any open pages to reload, so that they're once again talking directly to the dev server.
(The caveat here is that, as with all things service worker-y, this assumes that
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at firstname.lastname@example.org. Thanks!
If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact email@example.com if you have any questions.
I tried a hard refresh which only worked for one page reload, so if this kicks in after a hard refresh that's still a welcomed change.
If this PR works as advertised, that's freakin' awesome @jeffposnick! Thanks so much for this.