<blockquote>
<p dir="auto">Issue originally reported by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sheerun/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sheerun">@sheerun</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="262055792" data-permission-text="Title is private" data-url="https://github.com/babel/babel-preset-env/issues/434" data-hovercard-type="issue" data-hovercard-url="/babel/babel-preset-env/issues/434/hovercard" href="https://github.com/babel/babel-preset-env/issues/434">babel/babel-preset-env#434</a></p>
</blockquote>
<p dir="auto">When using <code class="notranslate">useBuiltIns: 'usage'</code> and doing two passes with babel, it can require polyfills multiple times, what makes babel not idempotent on second run (in my opinion it should be).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="require(&quot;babel-polyfill/lib/core-js/modules/es6.promise&quot;);

require(&quot;babel-polyfill/lib/core-js/modules/es6.symbol&quot;);

require(&quot;babel-polyfill/lib/core-js/modules/web.dom.iterable&quot;);

function _typeof2(obj) { if (typeof Symbol === &quot;function&quot; &amp;&amp; typeof Symbol.iterator === &quot;symbol&quot;) { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj &amp;&amp; typeof Symbol === &quot;function&quot; &amp;&amp; obj.constructor === Symbol &amp;&amp; obj !== Symbol.prototype ? &quot;symbol&quot; : typeof obj; }; } return _typeof2(obj); }

require(&quot;babel-polyfill/lib/core-js/modules/es6.symbol&quot;);

require(&quot;babel-polyfill/lib/core-js/modules/web.dom.iterable&quot;);

require(&quot;babel-polyfill/lib/regenerator-runtime/runtime&quot;);

require(&quot;babel-polyfill/lib/core-js/modules/es6.string.starts-with&quot;);"><pre class="notranslate"><code class="notranslate">require("babel-polyfill/lib/core-js/modules/es6.promise");

require("babel-polyfill/lib/core-js/modules/es6.symbol");

require("babel-polyfill/lib/core-js/modules/web.dom.iterable");

function _typeof2(obj) { if (typeof Symbol === "function" &amp;&amp; typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj &amp;&amp; typeof Symbol === "function" &amp;&amp; obj.constructor === Symbol &amp;&amp; obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }

require("babel-polyfill/lib/core-js/modules/es6.symbol");

require("babel-polyfill/lib/core-js/modules/web.dom.iterable");

require("babel-polyfill/lib/regenerator-runtime/runtime");

require("babel-polyfill/lib/core-js/modules/es6.string.starts-with");
</code></pre></div>
<blockquote>
<p dir="auto">Issue originally made by Ivan (istarkov)</p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.6.0</li>
<li><strong>Node version:</strong> 5.6.0</li>
<li><strong>npm version:</strong> 3.7.5</li>
</ul>
<h3 dir="auto">Description</h3>
<p dir="auto">Looks like bug in latest 6.6.0 babel version</p>
<p dir="auto">Next simple plugin</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default function (/* { types: t } */) {
  return {
    visitor: {
      CallExpression(path) {
        const { callee: { type, name } } = path.node;
        console.log('calleeName', type, name);
      },
    },
  };
}"><pre class="notranslate"><code class="notranslate">export default function (/* { types: t } */) {
  return {
    visitor: {
      CallExpression(path) {
        const { callee: { type, name } } = path.node;
        console.log('calleeName', type, name);
      },
    },
  };
}
</code></pre></div>
<p dir="auto">for a file</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import css from './some';"><pre class="notranslate"><code class="notranslate">import css from './some';
</code></pre></div>
<p dir="auto">outputs</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="calleeName Identifier require
calleeName Identifier _interopRequireDefault"><pre class="notranslate"><code class="notranslate">calleeName Identifier require
calleeName Identifier _interopRequireDefault
</code></pre></div>
<p dir="auto">but for a same file + console.log</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import css from './some';
console.log(css);"><pre class="notranslate"><code class="notranslate">import css from './some';
console.log(css);
</code></pre></div>
<p dir="auto">outputs</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="calleeName MemberExpression undefined"><pre class="notranslate"><code class="notranslate">calleeName MemberExpression undefined
</code></pre></div>
<p dir="auto">but must output</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="calleeName MemberExpression undefined
calleeName Identifier require
calleeName Identifier _interopRequireDefault"><pre class="notranslate"><code class="notranslate">calleeName MemberExpression undefined
calleeName Identifier require
calleeName Identifier _interopRequireDefault
</code></pre></div>
<p dir="auto">This breaks this plugin <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="137472092" data-permission-text="Title is private" data-url="https://github.com/istarkov/babel-plugin-webpack-loaders/issues/39" data-hovercard-type="issue" data-hovercard-url="/istarkov/babel-plugin-webpack-loaders/issues/39/hovercard" href="https://github.com/istarkov/babel-plugin-webpack-loaders/issues/39">istarkov/babel-plugin-webpack-loaders#39</a><br>
And some others I know</p>