Skip to content

Commit

Permalink
fix(gatsby-plugin-offline): use base path instead of path prefix (#17446
Browse files Browse the repository at this point in the history
)

* Set path resources on route update (for initial page load)

* use base path instead of path prefix

* fix min gatsby version
  • Loading branch information
vtenfys authored and GatsbyJS Bot committed Sep 9, 2019
1 parent 7edf731 commit 71437d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-offline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"license": "MIT",
"main": "index.js",
"peerDependencies": {
"gatsby": "^2.0.100"
"gatsby": "^2.4.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-offline/src/gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function setPathResources(path, getResourceURLsForPathname) {
}

exports.onRouteUpdate = ({ location, getResourceURLsForPathname }) => {
const pathname = location.pathname.replace(__PATH_PREFIX__, ``)
const pathname = location.pathname.replace(__BASE_PATH__, ``)
setPathResources(pathname, getResourceURLsForPathname)
}

Expand Down

0 comments on commit 71437d6

Please sign in to comment.