File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3355,7 +3355,8 @@ changes:
33553355 description: Watch mode is now stable.
33563356-->
33573357
3358- Starts Node.js in watch mode and specifies what paths to watch.
3358+ Starts Node.js in watch mode and specifies what paths to watch (the paths could
3359+ include glob patterns,e.g., ` --watch-path='**/*.js' ` ).
33593360When in watch mode, changes in the watched paths cause the Node.js process to
33603361restart.
33613362This will turn off watching of required or imported modules, even when used in
@@ -3367,6 +3368,9 @@ This flag cannot be combined with
33673368Note: Using ` --watch-path ` implicitly enables ` --watch ` , which requires a file path
33683369and is incompatible with ` --run ` , as ` --run ` takes precedence and ignores watch mode.
33693370
3371+ When using ` --watch-path ` with glob patterns, you must include quotations ` '<glob-pattern>' ` to
3372+ ensure it does not get expanded by the shell interpreter
3373+
33703374``` bash
33713375node --watch-path=./src --watch-path=./tests index.js
33723376```
You can’t perform that action at this time.
0 commit comments