title: How to use await import() for an exported constructor function?
body: <p>I have this as my function constructor:</p>
  <p><strong>test.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>const myConstructor = function(){
    this.hi = 'hi'
    console.log(this.hi)
  }
  export default myConstructor
  </code></pre>
  <p><strong>And I'm trying to <code>await import()</code> it in test2.js:</strong></p>
  <p><strong>test2.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>const test = await import('./test.js')
  
  new test()
  </code></pre>
  <p>This fails with <code>TypeError: test is not a constructor</code>.</p>
  <p><strong>However, if I import it normally it works fine:</strong></p>
  <p><strong>test2.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>import test from './test.js'
  //const test = await import('./test.js')
  
  new test()
  </code></pre>
  <p>^^ prints <code>hi</code> to the console.</p>
  <p>What is going on here? Why do the two approaches behave so differently for constructor functions? This doesn't appear to happen for normal functions.</p>
  <p>I've had to work around this by calling the constructor function directly within the constructor function module, and this is not ideal.</p>