title: How to run ECMAScript (mjs files) with nodemon?
body: <p>I am able to run mjs files with nodejs using <code>--experimental-modules</code> flag.</p>
  
  <pre class="lang-sh prettyprint-override"><code>node --experimental-modules index.mjs
  </code></pre>
  
  <p>package.json:</p>
  
  <pre><code>{
      "name": "mjs-tests",
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "scripts": {
          "dev": "nodemon index.mjs"
      },
      "keywords": [],
      "author": "",
      "license": "ISC",
      "dependencies": {
          "chalk": "^2.4.2",
          "uuid": "^3.3.2"
      },
      "devDependencies": {
          "nodemon": "^1.19.1"
      }
  }
  </code></pre>
  
  <p>And index.mjs</p>
  
  <pre class="lang-js prettyprint-override"><code>
  
  import http from 'http'
  
  const server = http.createServer((req, res) =&gt; {
      res.end('hello')
  })
  
  const PORT = 5000
  server.listen(PORT, () =&gt; {
      console.log(`‍♀️ Server is running at http://localhost:${PORT}`)
  })
  
  </code></pre>
  
  <p>But if I try to</p>
  
  <pre class="lang-sh prettyprint-override"><code>npm run dev
  </code></pre>
  
  <p>or (with nodemon installed globally)</p>
  
  <pre class="lang-sh prettyprint-override"><code>nodemon index.mjs
  </code></pre>
  
  <p>I get this error</p>
  
  <pre class="lang-sh prettyprint-override"><code>[nodemon] 1.19.1
  [nodemon] to restart at any time, enter `rs`
  [nodemon] watching: *.*
  [nodemon] starting `node index.mjs`
  internal/modules/cjs/loader.js:821
    throw new ERR_REQUIRE_ESM(filename);
    ^
  
  Error [ERR_REQUIRE_ESM]: Must use import to load ES Module
  </code></pre>
  
  <p>So, How I can enable support for ECMAScript in nodemon? Or should I use something like <a href="https://github.com/standard-things/esm/blob/master/README.md" rel="noreferrer">esm</a>?</p>