-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
--prefix-paths flag is always enabled #2551
Comments
I am also getting this same issue. Anyone has a fix ? |
@vieckys this should have been fixed a while ago. Are you using a recent version of Gatsby? |
@m-allanson hmm it may be 2 - 3 months old. |
Ok I’d try updating to a newer version
…On 28 Mar 2018, 07:02 +0200, Hemant Sankhla ***@***.***>, wrote:
hmm it may be 2 - 3 months old.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I'm getting the opposite- neither |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setting a
pathPrefix
ingatsby-config.js
will causegatsby build
to use that path prefix in all production builds - i.e.gatsby build
andgatsby build --prefix-paths
produce the same output.This means that sites built with
gatsby build
will have broken navigation and trigger errors in the browser console.It looks like this is caused by an unexpected value in the equality check in
loader.js
.__PREFIX_PATHS__
is aReferenceError
instead ofundefined
. This causes thepathPrefix
to be used, resulting in Gatsby being unable to match window paths with its own list of paths.I'm a bit hazy on the precise differences between a ReferenceError and undefined, but hopefully this is enough info for someone to track down the problem.
I've created an example repo (based on gatsby's default starter) that demonstrates the problem at https://github.com/m-allanson/gatsby-path-prefix-test
The text was updated successfully, but these errors were encountered: