A registered service worker breaks development
Created by: Timer
If you happen to run serve -s build
and it installs a localhost service worker, all future development is borked (no page reloading).
We need to fix this problem... do we need to add something like this?
if (process.env.NODE_ENV === 'development') {
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for (let registration of registrations) {
registration.unregister()
}
})
}
I believe the docs mention this, but it's super annoying.
/cc @jeffposnick