Skip to content

Commit 73167e3

Browse files
jgierer12pieh
authored andcommitted
docs(gatsby-plugin-offline): Add instructions for removing service worker (#10075)
Related to #9913
1 parent 351aaa3 commit 73167e3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/gatsby-plugin-offline/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,19 @@ const options = {
6363
clientsClaim: true,
6464
}
6565
```
66+
67+
## Remove
68+
69+
If you want to remove `gatsby-plugin-offline` from your site at a later point,
70+
substitute it with [`gatsby-plugin-remove-serviceworker`](https://www.npmjs.com/package/gatsby-plugin-remove-serviceworker)
71+
to safely remove the service worker:
72+
73+
```diff:title=gatsby-config.js
74+
plugins: [
75+
- `gatsby-plugin-offline`,
76+
+ `gatsby-plugin-remove-serviceworker`,
77+
]
78+
```
79+
80+
This will ensure that the worker is properly unregistered, instead of leaving an
81+
outdated version registered in users' browsers.

0 commit comments

Comments
 (0)