Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nodemon - specifying extension watch list using config files

Is there a way to specify watch list using config files instead of command line?


Command line method in nodemon's doc:

nodemon github


I attempted to use a nodemon.json config file with the following:

{ 
"ext": ["js", "json", "hbs", "html"]
}

Returned an 'extension.match' error.

Then I tried to add the config to package.json with the below:

{...
"nodemonConfig": {
    "ext": ["js", "json", "hbs", "html"]
  }
...}

Also same error.

I have a feeling both approaches are on the right track, but I'm missing something.

like image 719
Enrichdev Avatar asked Mar 21 '26 09:03

Enrichdev


1 Answers

You can use a nodemon.json file in the root of your application you were almost there but the syntax is slightly different to what you had the correct syntax would look like this:

{
    "ext": "js,json,hbs,html"
}
like image 54
Lucas Avatar answered Mar 22 '26 23:03

Lucas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!