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

Load environments variables in dev #2276

Merged
merged 2 commits into from
Mar 28, 2024
Merged

Load environments variables in dev #2276

merged 2 commits into from
Mar 28, 2024

Conversation

emersonlaurentino
Copy link
Member

What's the purpose of this pull request?

Env vars aren't available on development. So in this pr, I allow to load vtex.env in the process.env in development.

How it works?

All env var in vtex.env are available on process.env during development.

How to test it?

Create a custom env var in vtex.env and try to use it on your store.

@emersonlaurentino emersonlaurentino self-assigned this Mar 28, 2024
@emersonlaurentino emersonlaurentino requested a review from a team as a code owner March 28, 2024 15:09
@emersonlaurentino emersonlaurentino requested review from eduardoformiga and lariciamota and removed request for a team March 28, 2024 15:09
Copy link

vercel bot commented Mar 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
faststore-site ⬜️ Ignored (Inspect) Visit Preview Mar 28, 2024 3:10pm

@emersonlaurentino emersonlaurentino changed the title Loading environments variables in dev Load environments variables in dev Mar 28, 2024
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

@hellofanny hellofanny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🚀
I've tried and it's working as expected.
image

@emersonlaurentino emersonlaurentino merged commit e145ef6 into main Mar 28, 2024
7 checks passed
@emersonlaurentino emersonlaurentino deleted the fix/dev-env branch March 28, 2024 16:47
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

Successfully merging this pull request may close these issues.

None yet

3 participants