Skip to content

Commit

Permalink
fix(gatsby-plugin-offline): Update regex to catch new static query re…
Browse files Browse the repository at this point in the history
…sults (#26329)

* Update regex to catch new static query results

* Update comment and remove unnecessary rule
  • Loading branch information
sidharthachatterjee authored Aug 10, 2020
1 parent 8fc269e commit 75ab9b8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/gatsby-plugin-offline/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,9 @@ exports.onPostBuild = (
handler: `CacheFirst`,
},
{
// page-data.json files are not content hashed
urlPattern: /^https?:.*\page-data\/.*\/page-data\.json/,
handler: `StaleWhileRevalidate`,
},
{
// app-data.json is not content hashed
urlPattern: /^https?:.*\/page-data\/app-data\.json/,
// page-data.json files, static query results and app-data.json
// are not content hashed
urlPattern: /^https?:.*\/page-data\/.*\.json/,
handler: `StaleWhileRevalidate`,
},
{
Expand Down

0 comments on commit 75ab9b8

Please sign in to comment.