From 68d52ac251495ac53e69a75ec694d6e160558df9 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Fri, 3 Jul 2026 14:51:14 -0700 Subject: [PATCH] chore(ui): preserve console.warn in prod builds to match lint allow-list The lint rule allows console.warn (allow: [warn, error]) but removeConsole only excluded error, so approved console.warn calls were silently dropped from production bundles. Add warn to the exclude list so the prod strip and the lint allow-list agree; only console.log/debug/info are stripped now, warn and error both survive (verified: warn 85 to 85, error 906 to 906, log 675 to 14). --- ui/litellm-dashboard/next.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/next.config.mjs b/ui/litellm-dashboard/next.config.mjs index 9cfddfd33ca..876df2b49cf 100644 --- a/ui/litellm-dashboard/next.config.mjs +++ b/ui/litellm-dashboard/next.config.mjs @@ -8,7 +8,7 @@ const __dirname = path.dirname(__filename); const nextConfig = { output: "export", compiler: { - removeConsole: process.env.NODE_ENV === "production" ? { exclude: ["error"] } : false, + removeConsole: process.env.NODE_ENV === "production" ? { exclude: ["error", "warn"] } : false, }, // Required with output: "export" — default image optimizer runs only in server mode. // See https://nextjs.org/docs/messages/export-image-api