diff --git a/packages/kit/src/types/synthetic/$env+static+private.md b/packages/kit/src/types/synthetic/$env+static+private.md index 40704d239772..05c17c0f6298 100644 --- a/packages/kit/src/types/synthetic/$env+static+private.md +++ b/packages/kit/src/types/synthetic/$env+static+private.md @@ -1,6 +1,6 @@ Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://kit.svelte.dev/docs/configuration#env) (if configured). -_Unlike_ [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination. +_Unlike_ [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time and must use a destructuring assignment. This enables optimisations like dead code elimination. ```ts import { API_KEY } from '$env/static/private';