From 506d6b83ec5d2507d0e13bbc99a44b121ef338ac Mon Sep 17 00:00:00 2001 From: abdout Date: Sat, 25 Apr 2026 16:56:10 +0300 Subject: [PATCH] chore(build): strip console.* from production via compiler.removeConsole 69 console.* calls across 30 files were shipping to production. Adds compiler.removeConsole keyed to NODE_ENV, excluding error and warn so genuine errors still reach Vercel logs. Closes #29 Co-Authored-By: Claude Opus 4.7 (1M context) --- next.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/next.config.ts b/next.config.ts index 8a51cc9..9ef4253 100644 --- a/next.config.ts +++ b/next.config.ts @@ -4,6 +4,11 @@ const nextConfig: NextConfig = { typescript: { ignoreBuildErrors: true, }, + compiler: { + removeConsole: process.env.NODE_ENV === 'production' + ? { exclude: ['error', 'warn'] } + : false, + }, images: { remotePatterns: [ {