title: Exporting a dynamic import
body: <p>I'd like to export a different package from a custom module based on an expression </p>
  
  <pre><code>const settings = {}
  
  const init = (sentry) =&gt; {
    sentry.init(settings)
    return sentry
  }
  
  const pkg = async () =&gt; {
    let mod
  
    if (__CLIENT__) {
      mod =  await import('@sentry/browser').then(init)
    } else {
      mod = await import('@sentry/node').then(init)
    }
    return mod
  }
  
  const Sentry = pkg()
  
  console.log({ Sentry })
  
  export default Sentry
  </code></pre>
  
  <p>However, when i import this file later i receive a pending promise </p>
  
  <pre><code>import Sentry from 'config/sentry'
  console.log(Sentry) // -&gt; promise pending 
  </code></pre>
  
  <p>Is it possible to default export the dynamically imported module at the top level? </p>
  
  <h1>update</h1>
  
  <p>I ended up going with require instead of dynamic imports, as supported by webpack globals setup on my system </p>
  
  <pre><code>const Sentry = __CLIENT__ ? require('@sentry/browser') : require('@sentry/node')
  </code></pre>