From e7d15ee5ec8d7e6d33cda840a8244ca7e2b4cf5e Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 30 Jan 2025 11:14:10 -0800 Subject: [PATCH] fix(web): remove warn and error console log removal (#1086) * fix(web): remove warn and error console log removal * chore: comment explaining VITE_ALLOW_CONSOLE_LOGS --- web/nuxt.config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/nuxt.config.ts b/web/nuxt.config.ts index 83170261f..3ca92da18 100644 --- a/web/nuxt.config.ts +++ b/web/nuxt.config.ts @@ -80,9 +80,11 @@ export default defineNuxtConfig({ vite: { plugins: [ + // Only remove non-critical console methods when VITE_ALLOW_CONSOLE_LOGS is false + // Keeps console.warn and console.error for debugging purposes !process.env.VITE_ALLOW_CONSOLE_LOGS && removeConsole({ - includes: ['log', 'warn', 'error', 'info', 'debug'], + includes: ['log', 'info', 'debug'], }), ], build: {