diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index 9e6b9eff70af4b..2a607dd6ba9948 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -1086,7 +1086,7 @@ export function loadEnv( const path = lookupFile(envDir, [file], true) if (path) { const parsed = dotenv.parse(fs.readFileSync(path), { - debug: !!process.env.DEBUG || undefined + debug: process.env.DEBUG?.includes('vite:dotenv') || undefined }) // let environment variables use each other