nodemon to exec "prestart" script at package.json
<p>I want to setup nodemon to run the <strong>"prestart"</strong> script when server restarts, the reason, I'm using webpack and I want to build <em>bundle.js</em> every time a file changes, I'm not using <code>webpack-dev-server</code> cause I don't know how to set it up with an existing node app running, I got my backend on <code>node.js</code>, help on that will be appreciated.</p>

<p>The way I've been working is: run <code>npm start</code> every time I make a change on the code, but that too much effort. </p>

<p>Here's the <code>scripts</code> object at <em>package.json</em> so that you have an idea of what's going on:</p>

<pre><code>"scripts": {
    "bundle": "webpack --config webpack.config.js",
    "prestart": "npm run bundle",
    "start": "node server.js"
  }
</code></pre>