-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support file globs with --watch-path
#45182
Comments
I would say there are two separate issues raised here:
|
Ah, wow, I don't know how I missed EDIT: On a side note, the docs state |
Thanks for reopening! Maybe the title can be changed to |
--watch
--watch-path
Refs: #40731 |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
I guess this one is still validly open, and just because it hasn't had activity, doesn't seem like that is a reason that it won't be implemented... 🤔 Probably will be a pretty common request as more people use the watch mode in the Node.js CLI. |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
not stale |
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the
never-stale
|
Given the repeated stale/unstale-ing of this issue, I've marked it as (Note the author is @ghost, so if more information is needed, that could be hard to obtain) |
One related problem that I'm having is that using IMO it should watch required/imported modules of any watch-path that I provide. (I am here trying to fix my watch script which was I ended up having to add all the node_modules I cared about as a watch-path, e.g. |
What is the problem this feature will solve?
The new experimental watch feature is awesome, but sometimes apps depend on non-imported files or data. For example, if your app has a set of templates that are read/cached at server start, updating an HTML file won't restart the process.
What is the feature you are proposing to solve the problem?
It would be extremely useful to provide an optional list of file globs that would also trigger a process restart. For example:
Note: this syntax is just to illustrate the idea.
What alternatives have you considered?
Some template engines/libraries have caching logic built in so it's disabled during local development, but supporting this in a more generic way would open up a lot of additional use cases without having to explicitly code against
NODE_ENV
or enabling/disabling caching. Since the watch feature already seems to do exactly what would be needed to make this work, it would simply have to accept an optional glob or list of globs to also watch along with any imports.The text was updated successfully, but these errors were encountered: