You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
### Fixed
6
6
7
-
-`process.env.X` is only inlined when `X`comes from a `.env` file (or`NODE_ENV` / `BABEL_ENV` / `envName`). Host/build tooling vars like `JEST_WORKER_ID` no longer leak into the app bundle ([#574](https://github.com/dotenvx/react-native-dotenv/issues/574)).
7
+
-`process.env.X` is only inlined when `X`is defined in a `.env` file (plus`NODE_ENV` / `BABEL_ENV` / `envName`). Stops build-tooling leaks into the bundle without hardcoding tool-specific names. Host/CI-only values still work through `@env` imports ([#574](https://github.com/dotenvx/react-native-dotenv/issues/574)).
Only allow environment variables defined in the `.env` file. This completely ignores everything already defined in the environment.
168
-
169
-
The `.env` file has to exist.
167
+
Only allow variables defined in your `.env` files. Host environment variables can still override values for those same keys at build time, but keys that exist only in the environment (and not in `.env`) are not imported.
Only keys present in your `.env` files are inlined (plus `NODE_ENV` / `BABEL_ENV` / `envName`). Other host environment variables — including build-tooling vars like `JEST_WORKER_ID` — are left alone so they do not leak into the app bundle.
229
+
`process.env.X` is only inlined when `X` is in your `.env` files (plus `NODE_ENV` / `BABEL_ENV` / `envName`). That keeps build-tooling noise out of the bundle without special-casing tool names.
230
+
231
+
For host/CI-only values, use `@env` imports — or put the key in `.env` and let CI override the value.
232
232
233
233
</details>
234
234
<details><summary>Expo</summary><br>
@@ -492,8 +492,9 @@ Prefer [Zod](https://zod.dev) to validate and infer types — see Types with Zod
492
492
493
493
By default, we will never modify any environment variables that have already been set. In particular, if there is a variable in your `.env` file which collides with one that already exists in your environment, then that variable will be skipped (the existing value wins at build time).
494
494
495
-
</details>
495
+
`process.env.X` is only inlined when `X` appears in a `.env` file. Host/CI-only keys still work via `import { X } from '@env'`.
0 commit comments