From 0785effaab487e8ab475ea2cb067eab60a636257 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sat, 3 May 2025 23:01:44 -0700 Subject: [PATCH] Fix the doc page for html --- docs/bundler/html.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/bundler/html.md b/docs/bundler/html.md index 1f1dcefd14..8147c4fa74 100644 --- a/docs/bundler/html.md +++ b/docs/bundler/html.md @@ -194,15 +194,15 @@ import "tailwindcss"; Only one of those are necessary, not all three. -## `--console` streams console logs from the browser to the terminal +### Echo console logs from browser to terminal Bun's dev server supports streaming console logs from the browser to the terminal. To enable, pass the `--console` CLI flag. -{% bunDevServerTerminal alt="bun --console ./index.html" path="./index.html" routes="" /%} +{% bunDevServerTerminal alt="bun ./index.html --console" path="./index.html --console" routes="" /%} -Each call to `console.log` or `console.error` will be broadcast to the terminal that started the server. +Each call to `console.log` or `console.error` will be broadcast to the terminal that started the server. This is useful to see errors from the browser in the same place you run your server. This is also useful for AI agents that watch terminal output. Internally, this reuses the existing WebSocket connection from hot module reloading to send the logs.