From 09c9de0a60a641c48a4b6faf72621a797aaef169 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sat, 27 Jul 2024 16:15:28 -0500 Subject: [PATCH] docs: Fix environment variable reference (#870) --- docs/guide/directory-structure/app-config.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide/directory-structure/app-config.md b/docs/guide/directory-structure/app-config.md index 2518aa57..e5c2582c 100644 --- a/docs/guide/directory-structure/app-config.md +++ b/docs/guide/directory-structure/app-config.md @@ -53,9 +53,9 @@ declare module 'wxt/sandbox' { } export default defineAppConfig({ - bugReportingDisabled: process.env.VITE_BUG_REPORTING_DISABLED === 'true', - apiKey: process.env.VITE_API_KEY, + bugReportingDisabled: import.meta.env.VITE_BUG_REPORTING_DISABLED === 'true', + apiKey: import.meta.env.VITE_API_KEY, }); ``` -> You don't have to do this, you can use `process.env.VITE_*` anywhere in your runtime code, but putting them here consolidates them to one place and defines what variables are expected. +> You don't have to do this, you can use `import.meta.env.VITE_*` anywhere in your runtime code, but putting them here consolidates them to one place and defines what variables are expected.