Skip to content

Commit e373935

Browse files
slieschkewombleton
authored andcommitted
Update PWA docs to point at the cra-template-pwa package (facebook#10805)
1 parent 8ccff6b commit e373935

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: docusaurus/docs/making-a-progressive-web-app.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ case.
3939
In addition to creating your local `src/service-worker.js` file, it needs to be
4040
registered before it will be used. In order to opt-in to the offline-first
4141
behavior, developers should look for the following in their
42-
[`src/index.js`](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/src/index.js)
42+
[`src/index.js`](https://github.com/cra-template/pwa/blob/master/packages/cra-template-pwa/template/src/index.js)
4343
file:
4444

4545
```js
4646
// If you want your app to work offline and load faster, you can change
4747
// unregister() to register() below. Note this comes with some pitfalls.
4848
// Learn more about service workers: https://cra.link/PWA
49-
serviceWorker.unregister();
49+
serviceWorkerRegistration.unregister();
5050
```
5151

5252
As the comment states, switching `serviceWorker.unregister()` to
@@ -82,7 +82,7 @@ or unreliable network.
8282

8383
Note: Resources that are not generated by `webpack`, such as static files that are
8484
copied over from your local
85-
[`public/` directory](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/public/)
85+
[`public/` directory](https://github.com/cra-template/pwa/tree/master/packages/cra-template-pwa/template/public/)
8686
or third-party resources, will not be precached. You can optionally set up Workbox
8787
[routes](https://developers.google.com/web/tools/workbox/guides/route-requests)
8888
to apply the runtime caching strategy of your choice to those resources.
@@ -128,7 +128,7 @@ following into account:
128128
fetched the latest updates that will be available the next time they load the
129129
page (showing a "New content is available once existing tabs are closed." message). Showing
130130
these messages is currently left as an exercise to the developer, but as a
131-
starting point, you can make use of the logic included in [`src/serviceWorker.js`](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/src/serviceWorker.js), which
131+
starting point, you can make use of the logic included in [`src/serviceWorkerRegistration.js`](https://github.com/cra-template/pwa/blob/master/packages/cra-template-pwa/template/src/serviceWorkerRegistration.js), which
132132
demonstrates which service worker lifecycle events to listen for to detect each
133133
scenario, and which as a default, only logs appropriate messages to the
134134
JavaScript console.
@@ -160,11 +160,11 @@ following into account:
160160
## Progressive Web App Metadata
161161

162162
The default configuration includes a web app manifest located at
163-
[`public/manifest.json`](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/public/manifest.json), that you can customize with
163+
[`public/manifest.json`](https://github.com/cra-template/pwa/blob/master/packages/cra-template-pwa/template/public/manifest.json), that you can customize with
164164
details specific to your web application.
165165

166166
When a user adds a web app to their homescreen using Chrome or Firefox on
167-
Android, the metadata in [`manifest.json`](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/public/manifest.json) determines what
167+
Android, the metadata in [`manifest.json`](https://github.com/cra-template/pwa/blob/master/packages/cra-template-pwa/template/public/manifest.json) determines what
168168
icons, names, and branding colors to use when the web app is displayed.
169169
[The Web App Manifest guide](https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/)
170170
provides more context about what each field means, and how your customizations

0 commit comments

Comments
 (0)