From 75ab9b86b9a08aa482c964eb6214ab3fcceceb8f Mon Sep 17 00:00:00 2001 From: Sidhartha Chatterjee Date: Mon, 10 Aug 2020 17:14:36 +0530 Subject: [PATCH] fix(gatsby-plugin-offline): Update regex to catch new static query results (#26329) * Update regex to catch new static query results * Update comment and remove unnecessary rule --- packages/gatsby-plugin-offline/src/gatsby-node.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/gatsby-plugin-offline/src/gatsby-node.js b/packages/gatsby-plugin-offline/src/gatsby-node.js index 8f4ac55939cb4..3f228c5847493 100644 --- a/packages/gatsby-plugin-offline/src/gatsby-node.js +++ b/packages/gatsby-plugin-offline/src/gatsby-node.js @@ -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`, }, {