Disable NX reading .env files behaviour from the nx.json config? #27435
RIP21
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
-
@RIP21 are you using dotenvx by requiring/importing it in code or by using the cli approach? I think the cli approach might pre-empt nx's behavior here:
Have you given that a shot already? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This behavior
https://nx.dev/recipes/tips-n-tricks/define-environment-variables
It is a major pain as it is only controlled by an environment variable and I cannot easily disable it for my editor and all my team, aside from using
.envrc
e.g.direnv
tool which complicates the initial setup for no good reason + also not really working well with IDEs (JetBrains is lacking good support for it if you execute commands from UI (Run configurations) and not the terminal, I assume VSCode isn't that better in that regard TBH, especially with NX extension).I'm using
dotenvx
for all my.env
files with encryption functionality https://dotenvx.com/docs/quickstart#add-encryption which NX doesn't understand, so it conflicts withdotenvx
reading.env.*
files as it reads them before in encrypted form, and thendotenvx
ignore these, as they're already available.I don't want to use
--override
mode ofdirenvx
, as it just complicates things even more as I still wish for global variables to have precedence over those in.env.local
.I use NX in monorepo mode (not integrated).
Beta Was this translation helpful? Give feedback.
All reactions