Skip to content

Commit b44aca0

Browse files
samloganGatsbyJS Bot
authored and
GatsbyJS Bot
committed
fix(gatsby-plugin-offline): Update incorrect casing for runtimeCachin… (#19817)
Current configuration object with camel case handlers returns: ``` ValidationError: child "runtimeCaching" fails because ["runtimeCaching" at position 0 fails because [child "handler" fails because ["handler" must be a Function, "handler" must be one of [cacheFirst, cacheOnly, networkFirst, networkOnly, staleWhileRevalidate]]]] ```
1 parent e5a01a0 commit b44aca0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/gatsby-plugin-offline/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -143,22 +143,22 @@ const options = {
143143
// Use cacheFirst since these don't need to be revalidated (same RegExp
144144
// and same reason as above)
145145
urlPattern: /(\.js$|\.css$|static\/)/,
146-
handler: `CacheFirst`,
146+
handler: `cacheOnly`,
147147
},
148148
{
149149
// page-data.json files are not content hashed
150150
urlPattern: /^https?:.*\page-data\/.*\/page-data\.json/,
151-
handler: `NetworkFirst`,
151+
handler: `networkFirst`,
152152
},
153153
{
154154
// Add runtime caching of various other page resources
155155
urlPattern: /^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/,
156-
handler: `StaleWhileRevalidate`,
156+
handler: `staleWhileRevalidate`,
157157
},
158158
{
159159
// Google Fonts CSS (doesn't end in .css so we need to specify it)
160160
urlPattern: /^https?:\/\/fonts\.googleapis\.com\/css/,
161-
handler: `StaleWhileRevalidate`,
161+
handler: `staleWhileRevalidate`,
162162
},
163163
],
164164
skipWaiting: true,

0 commit comments

Comments
 (0)