From c2f00214e41b62196fab9108da76609aa8edbaa4 Mon Sep 17 00:00:00 2001 From: Enzo Innocenzi Date: Mon, 31 Jan 2022 14:39:08 +0100 Subject: [PATCH] fix: debug `dotenv` when specifically scoped (#6682) --- packages/vite/src/node/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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