From 0ba37d41bd0b2fe7b2144647c2e39b989521e2b5 Mon Sep 17 00:00:00 2001 From: Jonathan Stanley Date: Fri, 6 Oct 2023 14:18:27 -0400 Subject: [PATCH] Update $env+static+private.md must use destructuring assignment --- packages/kit/src/types/synthetic/$env+static+private.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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';