micro-dev
micro-dev copied to clipboard
cwd is always watched for reload although path is passed
I was expecting that launching micro-dev api
will only watch 'api' folder but it is reloading after any file on my project changes, also outside api folder.
I have solved that using --ignore flag but I find the behavior that I expected more rational.
micro-dev CLI expect a file instead (it will attempt to resolve index.js file if you give a folder, the same way require
resolves paths).
To watch a specific folder, you can use --watch
or -w
Thanks, you have solved my problem.
I was confused about --watch
usage, --help
says:
-w, --watch <dir> A directory to watch in addition to [path]
I think the help text is almost correct. the [path]
is always watched. in your situation, [path]
=== api/index.js
. I think the missing piece in the help is that it should say "if watch is not set, micro-dev will watch your cwd".