File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3417,14 +3417,19 @@ added:
34173417 - v18.11.0
34183418 - v16.19.0
34193419changes:
3420+ - version:
3421+ - REPLACEME
3422+ pr-url: https://github.com/nodejs/node/pull/59478
3423+ description: support glob patterns in paths
34203424 - version:
34213425 - v22.0.0
34223426 - v20.13.0
34233427 pr-url: https://github.com/nodejs/node/pull/52074
34243428 description: Watch mode is now stable.
34253429-->
34263430
3427- Starts Node.js in watch mode and specifies what paths to watch.
3431+ Starts Node.js in watch mode and specifies what paths to watch (the paths could
3432+ include glob patterns,e.g., ` --watch-path='**/*.js' ` ).
34283433When in watch mode, changes in the watched paths cause the Node.js process to
34293434restart.
34303435This will turn off watching of required or imported modules, even when used in
@@ -3436,6 +3441,9 @@ This flag cannot be combined with
34363441Note: Using ` --watch-path ` implicitly enables ` --watch ` , which requires a file path
34373442and is incompatible with ` --run ` , as ` --run ` takes precedence and ignores watch mode.
34383443
3444+ When using ` --watch-path ` with glob patterns, you must include quotations ` '<glob-pattern>' ` to
3445+ ensure it does not get expanded by the shell interpreter
3446+
34393447``` bash
34403448node --watch-path=./src --watch-path=./tests index.js
34413449```
You can’t perform that action at this time.
0 commit comments