<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ondras/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ondras">@ondras</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.4.0</li>
<li><strong>Node version:</strong> 0.10.25</li>
<li><strong>npm version:</strong> 3.5.2</li>
</ul>
<h3 dir="auto">Input code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export function a() {
  alert(&quot;a&quot;);
}

function b() {
  a();
}

b();
"><pre class="notranslate"><code class="notranslate">export function a() {
  alert("a");
}

function b() {
  a();
}

b();

</code></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">Exported and non-exported functions end up in different scopes, which makes exported functions uncallable from within non-exported functions.</p>
<p dir="auto">Output code (using SystemJS module output):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="System.register(&quot;...&quot;, [], function (_export, _context) {
  function b() {
    a();
  }

  return {
    setters: [],
    execute: function () {
      function a() {
        alert(&quot;a&quot;);
      }

      _export(&quot;a&quot;, a);

      b();
    }
  };
});
"><pre class="notranslate"><code class="notranslate">System.register("...", [], function (_export, _context) {
  function b() {
    a();
  }

  return {
    setters: [],
    execute: function () {
      function a() {
        alert("a");
      }

      _export("a", a);

      b();
    }
  };
});

</code></pre></div>
<p dir="auto">So, we have various files that are being compiled into a single library, many of which depend on core-js. The syntax <code class="notranslate">import core from 'core-js'</code> is invalid because core-js does not export default. However, compiling <code class="notranslate">import * as core from 'core-js'</code> in multiple files throws an error: Duplicate declaration "core".</p>