Add --watch-path-if-exists
#58436
Labels
feature request
Issues that request new features to be added to Node.js.
--watch-path-if-exists
#58436
Uh oh!
There was an error while loading. Please reload this page.
What is the problem this feature will solve?
With
--watch
and--env-file
it became possible to replace fs watcher packages with native functionality with something like#50993 introduced
--env-file-if-exists
which makes it possible to replace dotenv loader libraries with native functionality with something likeHowever there is no complimentary
--watch-path-if-exists
so it's not possible for the watcher to restart on changes to--env-file-if-exists
paths.Instead an error is thrown
What is the feature you are proposing to solve the problem?
Add a flag (or other mechanism) complimentary to #50993 to indicate that a path should be watched only it's found, and to throw otherwise.
What alternatives have you considered?
touch
ing the watched files before running node; invoking node via a shell script and "building up" the cli opts; pre-existing dotenv loaders such as thedotenv
package.The text was updated successfully, but these errors were encountered: