title: How can I conditionally import an ES6 module?
body: <p>I need to do something like:</p>
  
  <pre><code>if (condition) {
      import something from 'something';
  }
  // ...
  if (something) {
      something.doStuff();
  }
  </code></pre>
  
  <p>The above code does not compile; it throws <code>SyntaxError: ... 'import' and 'export' may only appear at the top level</code>.</p>
  
  <p>I tried using <code>System.import</code> as shown <a href="http://www.2ality.com/2013/07/es6-modules.html#module-loader-api" rel="noreferrer">here</a>, but I don't know where <code>System</code> comes from. Is it an ES6 proposal that didn't end up being accepted? The link to "programmatic API" from that article dumps me to a <a href="http://wiki.ecmascript.org/doku.php?id=harmony:module_loaders" rel="noreferrer">deprecated docs page</a>.</p>