remy / nodemon

Monitor for any changes in your node.js application and automatically restart the server - perfect for development
http://nodemon.io/
MIT License
26.13k stars 1.72k forks source link

Passing an array into ext config #2189

Closed lunavod closed 2 months ago

lunavod commented 4 months ago

When using nodemon.json, it is possible to pass an array into watch property, but not into ext. This is probably expected behavior, but it is not intuitive for a first-time user.

Expected behaviour

Nodemon works as usual, watching provided extensions

Actual behaviour

TypeError: extension.match is not a function

Steps to reproduce

mauroobento commented 4 months ago

According to Nodemon docs, there is no array in ext, only in options, as you can see


... 
{
  "restartable": "rs",
...
  "ext": "js,json"
}
lunavod commented 4 months ago

Yeah, it is more of a feature request. Or at least to get maintainer's opinion about this so I could maybe implement it myself and make a pull request

remy commented 3 months ago

Correct me if I'm wrong, but the nodemon.json is created by the author, right? If that's the case, why would the author be using an array instead of a string?

It's not a big change, but I just want to work out if there's actually a problem or a need, over something that's just a preference.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3

github-actions[bot] commented 2 months ago

Automatically closing this issue due to lack of activity