Today I learned that in Next.js development mode, console.log() may not be just a console log.
While profiling a performance issue, I discovered that Next.js was intercepting browser console methods and forwarding their payloads to the development server over WebSocket. One log statement resulted in approximately 65 MB of serialized traffic.
I spent more time trying to disable the feature than finding the original problem.
Eventually, the only reliable fix I found was restoring the native console implementation manually.
Here's the investigation.