Skip to content

Commit

Permalink
Fix import meta env reference in configuring-astro.mdx (withastro#5258
Browse files Browse the repository at this point in the history
)

Co-authored-by: Yan Thomas <[email protected]>
  • Loading branch information
liruifengv and yanthomasdev authored Nov 2, 2023
1 parent cfeb4b1 commit 6254ac1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/content/docs/en/guides/configuring-astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ export default defineConfig({
```
:::note
Vite-specific `import.meta` properties, like `import.meta.env` or `import.meta.glob`, are _not_ accessible from your configuration file. We recommend alternatives like [dotenv](https://github.com/motdotla/dotenv) or [fast-glob](https://github.com/mrmlnc/fast-glob) for these respective use cases.
{/* Need to use <code> here because Vite does an auto-replace on import-meta-env that breaks rendering */}
Vite-specific `import.meta` properties, like <code>{'import.meta.env'}</code> or `import.meta.glob`, are _not_ accessible from your configuration file. We recommend alternatives like [dotenv](https://github.com/motdotla/dotenv) or [fast-glob](https://github.com/mrmlnc/fast-glob) for these respective use cases.
:::
## Customising Output Filenames
Expand Down

0 comments on commit 6254ac1

Please sign in to comment.