Skip to content

Commit

Permalink
[environment-variables.mdx] link to astro:env (#8611)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergio A. Arevalo Soria <[email protected]>
Co-authored-by: Luiz Ferraz <[email protected]>
Co-authored-by: Bryce Russell <[email protected]>
Co-authored-by: Adam Matthiesen <[email protected]>
Co-authored-by: Reuben Tier <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
  • Loading branch information
7 people committed Jun 20, 2024
1 parent 09c0a5b commit 9841182
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/content/docs/en/guides/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ i18nReady: true
---
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'

:::tip[Looking for astro&#58;env\?]
Find out more about the [experimental `astro:env` API](/en/reference/configuration-reference/#experimentalenv) for type-safe environment variables!
:::

Astro uses Vite's built-in support for environment variables, which are statically replaced at build time, and lets you [use any of its methods](https://vitejs.dev/guide/env-and-mode.html) to work with them.

Note that while _all_ environment variables are available in server-side code, only environment variables prefixed with `PUBLIC_` are available in client-side code for security purposes.
Expand Down

0 comments on commit 9841182

Please sign in to comment.