Skip to content

Commit

Permalink
chore: type unknown env as any (#7702)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Apr 12, 2022
1 parent 8858180 commit 23fdef1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/guide/env-and-mode.md
Expand Up @@ -42,7 +42,7 @@ In addition, environment variables that already exist when Vite is executed have
`.env` files are loaded at the start of Vite. Restart the server after making changes.
:::

Loaded env variables are also exposed to your client source code via `import.meta.env`.
Loaded env variables are also exposed to your client source code via `import.meta.env` as strings.

To prevent accidentally leaking env variables to the client, only variables prefixed with `VITE_` are exposed to your Vite-processed code. e.g. the following file:

Expand Down
2 changes: 1 addition & 1 deletion packages/vite/types/importMeta.d.ts
Expand Up @@ -36,7 +36,7 @@ interface ImportMeta {
}

interface ImportMetaEnv {
[key: string]: string | boolean | undefined
[key: string]: any
BASE_URL: string
MODE: string
DEV: boolean
Expand Down

0 comments on commit 23fdef1

Please sign in to comment.