.env.local environment variables are not being picked up after upgrading from NX v18 to v19 #23362
Open
2 of 4 tasks
Labels
community
This is a good first issue for contributing
scope: bundlers
Issues related to webpack, rollup
type: bug
Current Behavior
Before I updated my project from NX v18 to v19, my environment variables e.g.
NX_USE_MSW
in.env.local
would work perfectly fine. I could log it out. Now that I've updated to v19, it logs out asundefined
instead of the value I set it to.When I move back to my branch with v18, everything works fine again.
Expected Behavior
I expect my environment variables to work when updating, or I expect a docs update on the migration required here.
GitHub Repo
No response
Steps to Reproduce
.env.local
file at the root of the NX ProjectNX_SOME_KEY=SOME_VALUE
process.env["NX_SOME_KEY"]
undefined
, instead of the expected"SOME_VALUE"
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
I'm using module federation and running the project in a dev-container if that might have anything to do with it.
The text was updated successfully, but these errors were encountered: