Skip to content

Commit

Permalink
fix(gatsby-plugin-offline): don't precache the index page (#9603)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
valin4tor authored and pieh committed Oct 31, 2018
1 parent 0f97ea3 commit 00284e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 0 additions & 2 deletions packages/gatsby-plugin-offline/src/gatsby-node.js
Expand Up @@ -53,7 +53,6 @@ exports.onPostBuild = (args, pluginOptions) => {

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

const globPatterns = files.concat([
`index.html`,
`offline-plugin-app-shell-fallback/index.html`,
...criticalFilePaths,
])
Expand Down
12 changes: 5 additions & 7 deletions yarn.lock
Expand Up @@ -2928,13 +2928,6 @@ babel-plugin-lodash@^3.2.11:
lodash "^4.17.10"
require-package-name "^2.0.1"

babel-plugin-macros@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.0.tgz#6c5f9836e1f6c0a9743b3bab4af29f73e437e544"
integrity sha512-flIBfrqAdHWn+4l2cS/4jZEyl+m5EaBHVzTb0aOF+eu/zR7E41/MoCFHPhDNL8Wzq1nyelnXeT+vcL2byFLSZw==
dependencies:
cosmiconfig "^5.0.5"

babel-plugin-macros@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.2.tgz#21b1a2e82e2130403c5ff785cba6548e9b644b28"
Expand Down Expand Up @@ -11330,6 +11323,11 @@ json-stable-stringify@^1.0.0:
dependencies:
jsonify "~0.0.0"

json-stream-stringify@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/json-stream-stringify/-/json-stream-stringify-2.0.1.tgz#8bc0e65ff94567d9010e14c27c043a951cb14939"
integrity sha512-5XymtJXPmzRWZ1UdLQQQXbjHV/E7NAanSClikEqORbkZKOYLSYLNHqRuooyju9W90kJUzknFhX2xvWn4cHluHQ==

json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
Expand Down

0 comments on commit 00284e0

Please sign in to comment.