title: Nodemon crashes when trying to use es6 modules but works well with es5
body: <p>I am trying to run a server using es6 modules but crashes every time I do it and works whenever I use it with es5<a href="https://i.stack.imgur.com/4uDdA.png" rel="nofollow noreferrer">error message</a></p>
  
  <p>I have babel installed and have "preset": ["env"] in my .babelrc file but whenever I run it, I have a "syntax error: Invalid or unexpected token". And this is not on one particular project, this is the third project where am experiencing this</p>
  
  <pre><code>import http from 'http';
  import express from 'express';
  import logger from 'morgan';
  import bodyParser from 'body-parser';
  
  // setting up express application
  const app = express();
  
  const hostName = '127.0.0.1';
  const port = 3000;
  const server = http.createServer(app);
  
  // logs request to the console
  app.use(logger('dev'))
  
  // Parse incoming data requests
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({
      extended: false
  }));
  
  // making a request to the server
  app.get('*', (req, res) =&gt; res.status(200).send({
      message: 'Welcome to the default API route',
  }));
  
  server.listen(port, hostName, () =&gt; {
      console.log(`Server running at http://${hostName}:${port}/`);
  });
  
  </code></pre>
  
  <p>it supposed to bring out "Welcome to the default API route" to the console but instead, it is an error message. And if the repo is needed, i will gladly supply it</p>