.env file override priority
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36.1k
- Forks
- 2.3k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 50
Description
Documentation issue
- Reporting a typo
- Reporting a documentation bug
- Documentation improvement
- Documentation feedback
Is there a specific documentation page you are reporting?
Additional context or description
Order of environment variable files is listed as
apps/my-app/.[target-name].env
apps/my-app/.env.[target-name]
apps/my-app/.local.env
apps/my-app/.env.local
apps/my-app/.env
.[target-name].env
.env.[target-name]
.local.env
.env.local
.env
However, based on a test, it seems .env.[target-name] is taking priority over .[target-name].env
See you can see this on the env-script-priority branch of this repo: https://github.com/DannyMeister/lerna-react-env-test/tree/env-script-priority
This is a follow-up to #3540
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the environment-variable ordering on the linked Nx documentation page and compare it with the behavior described on the env-script-priority branch. Confirm which filename takes priority, then correct the listed order and verify it against the branch's test; this is a follow-up to #3540.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100