Skip to content

Commit 00284e0

Browse files
vtenfyspieh
authored andcommitted
fix(gatsby-plugin-offline): don't precache the index page (#9603)
Fixes #7997 Rationale: we don't need to precache the index page, because the offline plugin automatically caches resources it finds in the `<head>` of the page it was installed on. So it just means that resources are cached a little later.
1 parent 0f97ea3 commit 00284e0

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

packages/gatsby-plugin-offline/src/gatsby-node.js

-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ exports.onPostBuild = (args, pluginOptions) => {
5353

5454
const criticalFilePaths = _.uniq(
5555
_.concat(
56-
getResourcesFromHTML(`${process.cwd()}/${rootDir}/index.html`),
5756
getResourcesFromHTML(`${process.cwd()}/${rootDir}/404.html`),
5857
getResourcesFromHTML(
5958
`${process.cwd()}/${rootDir}/offline-plugin-app-shell-fallback/index.html`
@@ -62,7 +61,6 @@ exports.onPostBuild = (args, pluginOptions) => {
6261
).map(omitPrefix)
6362

6463
const globPatterns = files.concat([
65-
`index.html`,
6664
`offline-plugin-app-shell-fallback/index.html`,
6765
...criticalFilePaths,
6866
])

yarn.lock

+5-7
Original file line numberDiff line numberDiff line change
@@ -2928,13 +2928,6 @@ babel-plugin-lodash@^3.2.11:
29282928
lodash "^4.17.10"
29292929
require-package-name "^2.0.1"
29302930

2931-
babel-plugin-macros@^2.4.0:
2932-
version "2.4.0"
2933-
resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.0.tgz#6c5f9836e1f6c0a9743b3bab4af29f73e437e544"
2934-
integrity sha512-flIBfrqAdHWn+4l2cS/4jZEyl+m5EaBHVzTb0aOF+eu/zR7E41/MoCFHPhDNL8Wzq1nyelnXeT+vcL2byFLSZw==
2935-
dependencies:
2936-
cosmiconfig "^5.0.5"
2937-
29382931
babel-plugin-macros@^2.4.2:
29392932
version "2.4.2"
29402933
resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.2.tgz#21b1a2e82e2130403c5ff785cba6548e9b644b28"
@@ -11330,6 +11323,11 @@ json-stable-stringify@^1.0.0:
1133011323
dependencies:
1133111324
jsonify "~0.0.0"
1133211325

11326+
json-stream-stringify@^2.0.1:
11327+
version "2.0.1"
11328+
resolved "https://registry.yarnpkg.com/json-stream-stringify/-/json-stream-stringify-2.0.1.tgz#8bc0e65ff94567d9010e14c27c043a951cb14939"
11329+
integrity sha512-5XymtJXPmzRWZ1UdLQQQXbjHV/E7NAanSClikEqORbkZKOYLSYLNHqRuooyju9W90kJUzknFhX2xvWn4cHluHQ==
11330+
1133311331
json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
1133411332
version "5.0.1"
1133511333
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"

0 commit comments

Comments
 (0)