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

feat(core): allow loading env vars by target and configuration #14998

Merged

Conversation

AgentEnder
Copy link
Member

Current Behavior

Nx can load env vars by target name

Expected Behavior

Nx can load env vars by target name combined with configuration

Related Issue(s)

Fixes #14931

@vercel
Copy link

vercel bot commented Feb 14, 2023

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

Name Status Preview Comments Updated
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 14, 2023 at 9:48PM (UTC)

Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a comment

Choose a reason for hiding this comment

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

Double Triple check the order in the code and the docs.

@AgentEnder AgentEnder force-pushed the feat/core/load-env-vars-by-config branch from 9515f2c to 3427e10 Compare February 14, 2023 21:45
@the-ult
Copy link

the-ult commented Feb 15, 2023

Great PR. Thanks.

Are the docs gonna be updated as well?

@AgentEnder
Copy link
Member Author

The docs updates are in this PR

@the-ult
Copy link

the-ult commented Feb 15, 2023

The docs updates are in this PR

Ow.. You're right. Thought it where the tests. My bad.

Thanks again 👍

FrozenPandaz pushed a commit that referenced this pull request Feb 15, 2023
@mathura333
Copy link

mathura333 commented Feb 26, 2023

@AgentEnder Shouldn't we also load apps/my-app/.env.[configuration-name], apps/my-app/.[configuration-name].env , .env.[configuration-name] , .[configuration-name].env?

This is a very common requirement

@github-actions
Copy link

github-actions bot commented Mar 3, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Nx, by default, to parse env files by target configuration name
5 participants