title: How does lazy module loading work in ES6
body: <p>How can I <em>lazily-load</em> ES6 modules? By <em>lazy</em>, I mean I don't want to actually load modules that <strong>aren't needed</strong>. For example, here's something I can do with RequireJS:</p>
  
  <pre class="lang-js prettyprint-override"><code>function someEventHandler() {
      var SomeModule = require('some-module'),
          module = new SomeModule();
      // ...
  }
  </code></pre>
  
  <p>Something along the same lines doesn't appear to be possible using ES6 imports:</p>
  
  <pre class="lang-js prettyprint-override"><code>// Doesn't appear to be valid...
  function someEventHandler() {
      import SomeModule from 'some-module';
      var module = new SomeModule();
      // ...
  }
  </code></pre>
  
  <p>Are there any viable techniques to only pull in dependencies when needed, using ES6 modules? Or is the only path to trace the full dependency graph and fetch everything up-front?</p>