From bb61e507940c5111c2abfd46659b5bcd94a7c44f Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Thu, 5 Feb 2026 06:09:26 +0300 Subject: [PATCH] chore: suppress console output in production - Silence console.log/debug/info in production mode - Keep filtered console.warn for important warnings - Keep console.error for critical issues --- web/src/main.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/src/main.tsx b/web/src/main.tsx index e3d7d0ef..9825ce79 100644 --- a/web/src/main.tsx +++ b/web/src/main.tsx @@ -1,6 +1,13 @@ -// Suppress noisy Polkadot.js API warnings in production +// Suppress console output in production // Must be at the very top before any imports if (typeof window !== 'undefined' && import.meta.env.PROD) { + // Suppress console.log, debug, info in production + const noop = () => {}; + console.log = noop; + console.debug = noop; + console.info = noop; + + // Filter noisy warnings but keep important ones const originalWarn = console.warn; const suppressedPatterns = [ 'RPC methods not decorated',