diff --git a/docs/basic-features/environment-variables.md b/docs/basic-features/environment-variables.md index 7f9d7d70e914..d68a614627ed 100644 --- a/docs/basic-features/environment-variables.md +++ b/docs/basic-features/environment-variables.md @@ -46,8 +46,7 @@ export async function getStaticProps() { } ``` -> **Note**: In order to keep server-only secrets safe, Next.js replaces `process.env.*` with the correct values -> at build time. This means that `process.env` is not a standard JavaScript object, so you’re not able to +> **Note**: In order to keep server-only secrets safe, environment variables are evaluated at build time, so only environment variables _actually_ used will be included. This means that `process.env` is not a standard JavaScript object, so you’re not able to > use [object destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment). > Environment variables must be referenced as e.g. `process.env.PUBLISHABLE_KEY`, _not_ `const { PUBLISHABLE_KEY } = process.env`.