title: Gulp throws error 'Must use import to load ES Module'
body: <p>We're converting our <code>gulpfile.js</code> in node <code>v13.8.0</code> to ES6 as following:</p>
  
  <pre class="lang-js prettyprint-override"><code>import { src, dest, series, parallel, watch } from 'gulp'
  import nodemon from 'gulp-nodemon' // normal nodemon does not display an error on app crash
  import env from 'gulp-env'
  import browser from 'browser-sync'
  import sass from 'gulp-sass'
  // Tasks
  export default {
      cssTranspile: cssTranspile,
      jsTranspile: jsTranspile,
      server: series(startNodemon, startBrowserSync),
      default: series(
          parallel(
              cssTranspile,
              jsTranspile
          ),
          startNodemon,
          startBrowserSync,
          function () {
              watch('public/scss/*.scss', cssTranspile)
          }
      )
  }
  </code></pre>
  
  <p>The error reported, when simply running <code>gulp</code>, is:</p>
  
  <pre><code>internal/modules/cjs/loader.js:1160
        throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
        ^
  
  Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: T:\Node\ICP\gulpfile.js
  require() of ES modules is not supported.
  </code></pre>
  
  <p>I must be doing something wrong. Anyone an idea on what it might be? </p>
  
  <pre><code>CLI version: 2.2.0
  Local version: 4.0.2
  </code></pre>
  
  <p>The flag <code>"type": "module",</code> is set in <code>package.json</code> as described in the <a href="https://nodejs.org/api/esm.html#esm_package_json_type_field" rel="noreferrer">note docs</a>. The issue is very much similar to <a href="https://github.com/manuelbieh/geolib/issues/208" rel="noreferrer">this issue</a> in the geolib library.</p>
  
  <p>And when we rename <code>gulpfile.js</code> to <code>gulpfile.babel.js</code> as described <a href="https://firxworx.com/blog/wordpress/using-gulp4-and-rsync-to-deploy-locally-and-beyond/" rel="noreferrer">here</a> we get the same error.</p>
  
  <p>The <code>package.json</code> contain these packages:</p>
  
  <pre class="lang-js prettyprint-override"><code>  "devDependencies": {
      "@babel/core": "^7.8.4",
      "@babel/preset-env": "^7.8.4",
      "@babel/register": "^7.8.3",
      "exports-loader": "^0.7.0",
      "gulp": "^4.0.2",
      "gulp-env": "^0.4.0",
      "gulp-nodemon": "^2.4.2",
      "gulp-sass": "^4.0.2",
      "nodemon": "^2.0.2"
    },
    "type": "module",
    "babel": {
      "presets": [
        "@babel/env"
      ]
  </code></pre>