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
This commit is contained in:
2026-02-05 06:09:26 +03:00
parent f09950c22d
commit 330384fd3d
+8 -1
View File
@@ -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',