Skip to content

need to improve documentation on service worker changes #5528

Closed
@acroyear

Description

@acroyear

I found that having a react-scripts 1.1.4 install then upgrading to 2.0.4/5, my service worker cache stuff would break. I could unregister in chrome by hand in devtools-application, load the app, it would register. Then if I were to control-r reload in Chrome, I would get nothing but 404's of the generated .js files. Only explicitly unregistering it would i get them back again.

It seems there are incompatibilities between the old registerServiceWorker.js file and the code that is used for the new version's serviceWorker.js.

Fix is to delete registerServiceWorker.js, copy serviceWorker.js from another more recently initialized project, and update the lines in your index.js file (the import and the actual register - look at the other project's index.js for the examples).

In addition, there are hyperlinks in "Making a Progressive Webapp" documentation that go to 404 pages, around the manifest.json mentions at the bottom. https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions