feature: --prefix-paths in gatsby develop
#16040
Replies: 13 comments 2 replies
-
pathPrefix is not currently supported in development mode. It wouldn't be a lot of work to get it up and running in development, but this is not something that's been a high priority for us. The general philosophy is to use Gatsby components (e.g. However -- in an effort of unification and reducing edge-cases/gotchas/etc. I totally agree that this could be valuable work. Would you like to work on making this possible? |
Beta Was this translation helpful? Give feedback.
-
Hey @DSchau, can you give a high-level direction on how this should be done? |
Beta Was this translation helpful? Give feedback.
-
Definitely interested in the high level direction as well. I enabled it quickly in the gatsby-cli's |
Beta Was this translation helpful? Give feedback.
-
Hello @DSchau @alexluong has there been any progress on this since @joshuagagne 's comment? I would be happy to help develop this feature if everyone else is busy, it's important for our site to work |
Beta Was this translation helpful? Give feedback.
-
@DSchau This is a feature that would be important for me, too. It is problematic to have our development environment setup NOT use the prefix path, while our production builds do, and it seems like it would be a good addition to allow the consistency of the same prefix path also in development. (For what it's worth, it's how the equivalent feature works on Create React App, so it would make that migration path easier for its users). |
Beta Was this translation helpful? Give feedback.
-
Can this be reopened? Would love to see this included in the next version. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I second that. We have had SO many bugs related to the prefix path (because it has to be removed when testing in the dev environment, but has to be present in the built environment). I do not understand the rationale to intentionally having such a significant discrepancy between the development and the built environments -- in fact, it's seems like an anti-pattern to introduce such differences, which can only result in errors that are not detectable during development. |
Beta Was this translation helpful? Give feedback.
-
We won't work on this but would be happy to receive a PR adding this functionality to |
Beta Was this translation helpful? Give feedback.
-
I might be able to attempt this next month, once I'm finished with my current project. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Please don't comment with "bump" or similar terms. GitHub discussions takes the 👍 votes into account for the "Top" sorting / you can share your agreement this way. |
Beta Was this translation helpful? Give feedback.
-
I'm interested in working on this, but not having much luck in finding where to start in the codebase. It doesn't look like gatsby-link needs any changes, and as noted above, the gatsby-cli change seems straightforward. Can any more experienced contributors/maintainers offer some guidance? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
seems like --path-prefix in dev mode was broken several versions ago
Steps to reproduce
gatsby develop --path-prefix
Expected result
all works
Actual result
browser tab died after same time

Environment
Beta Was this translation helpful? Give feedback.
All reactions