You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of `gatsby-plugin-offline` 3.0.0, the following options are available:
24
+
In `gatsby-plugin-offline` 3.x, the following options are available:
25
+
26
+
-`precachePages` lets you specify pages whose resources should be precached by the service worker, using an array of globs. For example:
27
+
28
+
```javascript:title=gatsby-config.js
29
+
plugins: [
30
+
{
31
+
resolve:`gatsby-plugin-offline`,
32
+
options: {
33
+
precachePages: [`/about-us/`, `/projects/*`],
34
+
},
35
+
},
36
+
]
37
+
```
38
+
39
+
Note: while essential resources of specified pages will be precached, such as JavaScript and CSS, non-essential resources such as fonts and images will not be included. Instead, these will be cached at runtime when a user visits a given page that includes these resources.
25
40
26
41
-`appendScript` lets you specify a file to be appended at the end of the generated service worker (`sw.js`). For example:
0 commit comments