Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pathprefix breaking sw.js include #1539

Closed
gregsqueeb opened this issue Jul 18, 2017 · 2 comments
Closed

Pathprefix breaking sw.js include #1539

gregsqueeb opened this issue Jul 18, 2017 · 2 comments

Comments

@gregsqueeb
Copy link
Contributor

When trying to use the pathprefix with the gatsby-starter-blog it is including the pathprefix on the sw.js include incorrectly: https://gregsqueeb.github.io/gregdmathews.com/ Instead of /gregdmathews.com/sw.js it is trying to include /gregdmathews.comsw.js which 404s.

Here is the repo that builds to that gh-pages as well. The only thing I have changed is adding the PathPrefix to the gatsbyconfig.
https://github.com/gregsqueeb/gregdmathews.com/tree/master

Going to look into how to fix this now with a PR, but if you know where the issue is off the top of your head let me know and it could speed up me hunting down the problem :)

gregsqueeb added a commit to gregsqueeb/gatsby that referenced this issue Jul 18, 2017
The pathPrefix does not include the trailing slash so we have to make sure to include it so that sw.js gets loaded properly and does not 404
@KyleAMathews
Copy link
Contributor

Oy, thanks for the fix!

And hello fellow correctly spelled Mathews :-D

KyleAMathews pushed a commit that referenced this issue Jul 19, 2017
…s properly. Fixing #1539 (#1540)

* Fixing #1539

The pathPrefix does not include the trailing slash so we have to make sure to include it so that sw.js gets loaded properly and does not 404

* Changing from '' to ``
@gregsqueeb
Copy link
Contributor Author

Haha :p Don't run into too many of us who correctly spell our last names!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants