Allow overriding pathPrefix using a CLI argument #30725
Unanswered
chrispytoes
asked this question in
Ideas / Feature Requests
Replies: 1 comment 3 replies
-
This would be a very helpful way for folks that have setups that use different pathPrefixes for preview environments. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm setting up a CI flow for a Gatsby site, and I'd like to be able to set the
pathPrefix
config value based on the environment the site is being built for. When building for development, I want to add a path prefix to host on GitLab pages, but no prefix when building for production.Was this ever considered or is there any particular reason it hasn't been done? It seems like a no-brainer to me that this should just be a simple CLI argument like:
gatsby build --prefix-paths /my-prefix
.I understand that the
pathPrefix
setting is ignored if--prefix-paths
is not provided, but it's still a one or the other choice. I feel that the prefix is more of a choice made by the environment, and should not be embedded into a config setting in the first place.Beta Was this translation helpful? Give feedback.
All reactions