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

fix(core): not load env files when NX_LOAD_DOT_ENV_FILES is false #23231

Conversation

xiongemi
Copy link
Collaborator

@xiongemi xiongemi commented May 8, 2024

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #23090

@xiongemi xiongemi requested review from a team as code owners May 8, 2024 02:44
Copy link

vercel bot commented May 8, 2024

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

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview May 10, 2024 3:09pm

@jaysoo
Copy link
Member

jaysoo commented May 8, 2024

Tested it locally using the repro from #23090. It is working.

@xiongemi xiongemi force-pushed the feature/nxc-646-support-nx_load_dot_env_files-to-disable-loading-dotenv branch from befaabd to 2861f9c Compare May 8, 2024 15:02
@@ -27,7 +27,10 @@ export async function runOne(
string,
(TargetDependencyConfig | string)[]
> = {},
extraOptions = { excludeTaskDependencies: false, loadDotEnvFiles: true } as {
extraOptions = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you also update run-many and affected please?

@xiongemi xiongemi force-pushed the feature/nxc-646-support-nx_load_dot_env_files-to-disable-loading-dotenv branch from 2861f9c to c195d63 Compare May 8, 2024 22:49
@xiongemi xiongemi force-pushed the feature/nxc-646-support-nx_load_dot_env_files-to-disable-loading-dotenv branch from c195d63 to c76f04a Compare May 9, 2024 14:30
@xiongemi xiongemi force-pushed the feature/nxc-646-support-nx_load_dot_env_files-to-disable-loading-dotenv branch from c76f04a to 1ec7d97 Compare May 9, 2024 15:18
@xiongemi xiongemi force-pushed the feature/nxc-646-support-nx_load_dot_env_files-to-disable-loading-dotenv branch from 1ec7d97 to de15de8 Compare May 9, 2024 16:55
@xiongemi xiongemi force-pushed the feature/nxc-646-support-nx_load_dot_env_files-to-disable-loading-dotenv branch from de15de8 to bb1d433 Compare May 9, 2024 23:17
@xiongemi xiongemi force-pushed the feature/nxc-646-support-nx_load_dot_env_files-to-disable-loading-dotenv branch from bb1d433 to 6b6006a Compare May 10, 2024 15:01
@FrozenPandaz FrozenPandaz merged commit 9122b85 into nrwl:master May 14, 2024
6 checks passed
FrozenPandaz pushed a commit that referenced this pull request May 14, 2024
…3231)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #23090

(cherry picked from commit 9122b85)
Coly010 pushed a commit that referenced this pull request May 15, 2024
…3231)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #23090
Copy link

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 May 20, 2024
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.

Nx serve not loading .env variable changes with monorepo format (Vite/Vue)
4 participants