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

docs: clarify env inclusion in bundles #41950

Merged
merged 2 commits into from
Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/api-reference/next.config.js/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ description: Learn to add and access environment variables in your Next.js appli
</ul>
</details>

> <b>Note</b>: environment variables specified in this way will <b>always</b> be included in the JavaScript bundle, prefixing the environment variable name with `NEXT_PUBLIC_` only has an effect when specifying them [through the environment or .env files](/docs/basic-features/environment-variables.md).
To add environment variables to the JavaScript bundle, open `next.config.js` and add the `env` config:

```js
Expand Down