From e3558b626c0c31493bc750d68030a3d0f98122e1 Mon Sep 17 00:00:00 2001 From: Ahmad Addel Date: Wed, 20 Sep 2023 07:34:26 +0300 Subject: add warning to Ensure correct placement of the '--watch' flag (#5447) * Update run.md * remove the wrong command example * Tweak --------- Co-authored-by: Colin McDonnell --- docs/cli/run.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/cli') diff --git a/docs/cli/run.md b/docs/cli/run.md index 59818980b..5172f0fa4 100644 --- a/docs/cli/run.md +++ b/docs/cli/run.md @@ -64,6 +64,17 @@ To run a file in watch mode, use the `--watch` flag. $ bun --watch run index.tsx ``` +{% callout %} +**Note** — When using `bun run`, put Bun flags like `--watch` immediately after `bun`. + +```bash +$ bun --watch run dev # ✔️ do this +$ bun run dev --watch # ❌ don't do this +``` + +Flags that occur at the end of the command will be ignores and passed through to the `"dev"` script itself. +{% /callout %} + ### `--smol` In memory-constrained environments, use the `--smol` flag to reduce memory usage at a cost to performance. -- cgit v1.2.3