diff --git a/packages/vite/src/node/env.ts b/packages/vite/src/node/env.ts index 5c1994288c6f98..6c29532f02a6f6 100644 --- a/packages/vite/src/node/env.ts +++ b/packages/vite/src/node/env.ts @@ -76,7 +76,7 @@ export function resolveEnvPrefix({ envPrefix = 'VITE_', }: UserConfig): string[] { envPrefix = arraify(envPrefix) - if (envPrefix.some((prefix) => prefix === '')) { + if (envPrefix.includes('')) { throw new Error( `envPrefix option contains value '', which could lead unexpected exposure of sensitive information.`, )