Skip to content

Commit 71437d6

Browse files
vtenfysGatsbyJS Bot
authored and
GatsbyJS Bot
committed
fix(gatsby-plugin-offline): use base path instead of path prefix (#17446)
* Set path resources on route update (for initial page load) * use base path instead of path prefix * fix min gatsby version
1 parent 7edf731 commit 71437d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/gatsby-plugin-offline/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"license": "MIT",
3535
"main": "index.js",
3636
"peerDependencies": {
37-
"gatsby": "^2.0.100"
37+
"gatsby": "^2.4.0"
3838
},
3939
"repository": {
4040
"type": "git",

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function setPathResources(path, getResourceURLsForPathname) {
7979
}
8080

8181
exports.onRouteUpdate = ({ location, getResourceURLsForPathname }) => {
82-
const pathname = location.pathname.replace(__PATH_PREFIX__, ``)
82+
const pathname = location.pathname.replace(__BASE_PATH__, ``)
8383
setPathResources(pathname, getResourceURLsForPathname)
8484
}
8585

0 commit comments

Comments
 (0)