PWA / Service worker breaking production deployments
Created by: ro-savage
EDIT: Issue appears to be with Firebase only
Service workers aren't refreshing index.html and therefore new deploys are showing old bundles.
This means production websites or really all deployed sites that use a single url/domain can not be updated.
PR #2441 - Is a hotfix (if needed) that just removes the service worker and updates docs to say they have been disabled temporarily.
@gaearon @timer @jeffposnick @addyosmani
Steps to reproduce
create-react-app sw-test
cd sw-test
npm install
npm run build
cd build
Deploy with firebase
firebase deploy
- Visit site https://[project].firebaseapp.com. Confirm working.
- Change app.js
npm run build
cd build
deploy firebase
Check website
- Visit site again and no changes shown. DevTools shows SW is providing index.html and old bundles.
- Force refresh a few times. No difference.
- Delete service worker.
- Refresh.
- See correctly updated site.
Can someone else confirm this is affecting them?
I am hoping I am doing something wrong and this isn't affecting every production deploy.