next.js
37daf155 - Experiment: surface forwarded browser warnings in development (#102785)

Commit
1 day ago
Experiment: surface forwarded browser warnings in development (#102785) ## Summary A busy dev server can keep a browser warning in memory: each subsequent log resets the file writer's timer. Flush the batch from the first queued message. After visiting a page, run `next internal browser-warnings` to print recorded browser warnings and errors with repeat counts, even when dev-server output is redirected. Pass `--log-file` for a custom log path. The command reads the last 256 KiB of the existing development log. It reports whether that window is truncated and how many browser entries it saw. An empty snapshot does not establish that a route is clean or that a browser visited it. ## Verification Exercised a browser warning followed by continuous server messages, repeated warnings, server-only errors, a missing file, and a partially written record. Added a deterministic regression test for flushing while logging continues. <!-- NEXT_JS_LLM -->
Author
Parents
Loading