title: Webpack dependencies from index.ts resolved in wrong order
body: <p>We heavily rely on <code>moduleResolution: 'node'</code> in our latest project. We generated index.ts barrels to simpify the import statements. However, when building the app with webpack, the modules seem to be resolved in the wrong order:</p>
  
  <p>I have a file <code>iconSet.ts</code></p>
  
  <pre><code>export var IconSet = {
      Add: 'icon-add',
      Remove: 'icon-remove'
  }
  </code></pre>
  
  <p>a second file <code>icons.ts</code>, which imports the IconSet variable</p>
  
  <pre><code>import { IconSet } from '.'
  
  export var Icons = {
      Add: IconSet.Add,
      Remove: IconSet.Remove
  }
  </code></pre>
  
  <p>and a index.ts file, that rollsup all exports like</p>
  
  <pre><code>export * from './icons'
  export * from './iconSet'
  </code></pre>
  
  <p>When importing the Icons variable in an app.ts, icons.ts is provided before inconSet.ts was processes. </p>
  
  <pre><code>import { Icons } from '.'
  console.log(Icons); // &lt;- Cannot read property 'Add' of undefined
  </code></pre>
  
  <p>I thought webpack would take care of this.</p>
  
  <p>Here is a minimal repo to reproduce the problem: <a href="https://github.com/eulbot/webpack-es6-index-barrels" rel="nofollow noreferrer">https://github.com/eulbot/webpack-es6-index-barrels</a></p>