Skip to content

Commit

Permalink
fix(gatsby-plugin-offline): Update incorrect casing for runtimeCachin… (
Browse files Browse the repository at this point in the history
#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]]]]
```
  • Loading branch information
samlogan authored and GatsbyJS Bot committed Nov 27, 2019
1 parent e5a01a0 commit b44aca0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/gatsby-plugin-offline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,22 @@ const options = {
// Use cacheFirst since these don't need to be revalidated (same RegExp
// and same reason as above)
urlPattern: /(\.js$|\.css$|static\/)/,
handler: `CacheFirst`,
handler: `cacheOnly`,
},
{
// page-data.json files are not content hashed
urlPattern: /^https?:.*\page-data\/.*\/page-data\.json/,
handler: `NetworkFirst`,
handler: `networkFirst`,
},
{
// Add runtime caching of various other page resources
urlPattern: /^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/,
handler: `StaleWhileRevalidate`,
handler: `staleWhileRevalidate`,
},
{
// Google Fonts CSS (doesn't end in .css so we need to specify it)
urlPattern: /^https?:\/\/fonts\.googleapis\.com\/css/,
handler: `StaleWhileRevalidate`,
handler: `staleWhileRevalidate`,
},
],
skipWaiting: true,
Expand Down

0 comments on commit b44aca0

Please sign in to comment.