title: Webpack import returns undefined, depending on the order of imports
body: <p>I'm using webpack + babel. I have three modules looking like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>// A.js
  
  // some other imports here
  console.log('A');
  export default 'some-const';
  
  // B.js
  
  import someConst from './A';
  console.log('B', someConst);
  export default 'something-else';
  
  // main.js
  
  import someConst from './A';
  import somethingElse from './B';
  console.log('main', someConst);
  </code></pre>
  
  <p>When <code>main.js</code> is executed, I see the following:</p>
  
  <pre><code>B undefined
  A
  main some-const
  </code></pre>
  
  <p>If I swap the imports in <code>main.js</code>, <code>B</code> becoming the first, I get:</p>
  
  <pre><code>A
  B some-const
  main some-const
  </code></pre>
  
  <p>How come <code>B.js</code> gets <code>undefined</code> instead of a module in the first version? What's wrong?</p>