diff options
author | 2023-09-20 07:34:26 +0300 | |
---|---|---|
committer | 2023-09-19 21:34:26 -0700 | |
commit | e3558b626c0c31493bc750d68030a3d0f98122e1 (patch) | |
tree | 996202d19d13857852a4b6b7efd9e74ed5eaeffe /docs/cli | |
parent | 5defdf3e28249b34772864a50273a390d345b2df (diff) | |
download | bun-e3558b626c0c31493bc750d68030a3d0f98122e1.tar.gz bun-e3558b626c0c31493bc750d68030a3d0f98122e1.tar.zst bun-e3558b626c0c31493bc750d68030a3d0f98122e1.zip |
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 <colinmcd94@gmail.com>
Diffstat (limited to 'docs/cli')
-rw-r--r-- | docs/cli/run.md | 11 |
1 files changed, 11 insertions, 0 deletions
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. |