From 8686c3d4561fe2430e088648785ecb984f10d16a Mon Sep 17 00:00:00 2001 From: Caspian Zhao <caspian.zhao@outlook.com> Date: Mon, 14 Oct 2024 12:52:01 -0700 Subject: [PATCH 1/2] Update doc for env prefix --- docs/en/docs/guides/development/environment-variables.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/en/docs/guides/development/environment-variables.mdx b/docs/en/docs/guides/development/environment-variables.mdx index 0dfcf71..f2b2e2b 100644 --- a/docs/en/docs/guides/development/environment-variables.mdx +++ b/docs/en/docs/guides/development/environment-variables.mdx @@ -25,6 +25,11 @@ The following file names are supported: 1. Create a new file using one of the supported file names at the same folder level as your `manifest.json` file. 2. In your extension code, add the Node.js pattern of `process.env.YOUR_VARIABLE_NAME`. +> [!important] +> Environment variables must start with `EXTENSION_PUBLIC_` to be accessible in your extension code. Variables without this prefix will not be available at runtime. + +3. Make sure to prefix all your environment variables with `EXTENSION_PUBLIC_`. + > TIP: Environment variables are not supported in the `manifest.json` file. See the sample below: From e587391cffcaea7f2fd93e995221bb2b59c64bf5 Mon Sep 17 00:00:00 2001 From: Caspian Zhao <caspian.zhao@outlook.com> Date: Mon, 14 Oct 2024 12:55:22 -0700 Subject: [PATCH 2/2] Update docs for env prefix --- docs/en/docs/guides/development/environment-variables.mdx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/en/docs/guides/development/environment-variables.mdx b/docs/en/docs/guides/development/environment-variables.mdx index f2b2e2b..a6edc00 100644 --- a/docs/en/docs/guides/development/environment-variables.mdx +++ b/docs/en/docs/guides/development/environment-variables.mdx @@ -24,10 +24,6 @@ The following file names are supported: 1. Create a new file using one of the supported file names at the same folder level as your `manifest.json` file. 2. In your extension code, add the Node.js pattern of `process.env.YOUR_VARIABLE_NAME`. - -> [!important] -> Environment variables must start with `EXTENSION_PUBLIC_` to be accessible in your extension code. Variables without this prefix will not be available at runtime. - 3. Make sure to prefix all your environment variables with `EXTENSION_PUBLIC_`. > TIP: Environment variables are not supported in the `manifest.json` file.