-
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
read GATSBY_* env vars and feed to webpack #2057
read GATSBY_* env vars and feed to webpack #2057
Conversation
Deploy preview ready! Built with commit a7626ee |
Oh this relates to #1462 and #660 (comment) |
I can't speak to whether this is good feature to add but if it is, it needs some documentation :) |
Yep mentioned I'd update some docs after it was blessed. Sounded like @KyleAMathews wanted it (Though I didn't see that until after this). #1462 (comment) I've been overriding my webpack config for each of the several gatsby projects I've been working with basically. Curious if others were doing that in order to get env variables of this nature in CI containers and such. Started to feel like it should be part of core like CRA. |
Looks solid to me! I'm on phone but will have some time in 12 hrs or so to merge and make a new release. |
Thanks! |
Do you know which version of gatsby this made into? |
A lot of them :-) Just upgrade to the latest version and you'll have it. |
Thx. Just browse through the release and found that it was gatsby@1.9.25 (at least that is the first release on Sep 9th). |
Hiya @dan-weaver! 👋 This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here. Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! 💪💜 |
I'd like to have these kinds of variables in addition to the .env file. Does anyone see any problem with this method? I think it's close to what CRA does. I'll add to the readme once it's approved.
NOTE: GATSBY_* vars defined in the environment will overwrite those defined in .env. I thought that made sense. Not sure though.
also should the variables be case insensitive?