<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/leebyron/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/leebyron">@leebyron</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.x</li>
<li><strong>npm version:</strong> 3.x</li>
</ul>
<h3 dir="auto">Description</h3>
<p dir="auto">Given that babel-runtime is now on v6.x, it was surprising that all the plugins still rely on babel-runtime "^5.0.0".</p>
<p dir="auto">Since my projects now use babel v6, and usually also use babel-runtime, I now encounter duplicate installations of babel-runtime in node_modules since the v6 and v5 conflict.</p>
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
const a = [1, 2, 3].contact(new Set([1, 2, 3]))<br>
// [1, 2, 3, [Set Object]]</p>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" const a = [1, 2, 3, ...new Set([1, 2, 3])]"><pre class="notranslate"> <span class="pl-k">const</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">,</span> ...<span class="pl-k">new</span> <span class="pl-v">Set</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">]</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
[1, 2, 3, 1, 2, 3]</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
{
    &quot;presets&quot;: [[
      &quot;@babel/env&quot;, {
            &quot;targets&quot;: {
                &quot;browsers&quot;: [&quot;&gt; 1%&quot;, &quot;ios &gt;= 8&quot;, &quot;android &gt;= 4.4&quot;, &quot;not ie &lt; 99&quot;, &quot;not edge &lt; 99&quot;]
            },
            &quot;useBuiltIns&quot;: &quot;usage&quot;,
            &quot;loose&quot;: true, 
            &quot;modules&quot;: false,
          }
      ], 
    &quot;@babel/preset-react&quot;
    ],
    &quot;plugins&quot;: [
      [&quot;@babel/plugin-proposal-decorators&quot;, { &quot;legacy&quot;: true }],
      [
        &quot;@babel/plugin-proposal-class-properties&quot;,
        {
          &quot;noMangle&quot;: true
        }
      ],
      &quot;@babel/plugin-transform-modules-commonjs&quot;
    ],
    &quot;ignore&quot;: [
      &quot;node_modules/**/*.js&quot;
    ],
    &quot;env&quot;: {
      &quot;test&quot;: {
        &quot;sourceMaps&quot;: &quot;inline&quot;
      }
    }
  }
  "><pre class="notranslate"><span class="pl-kos">{</span>
    <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-kos">[</span>
      <span class="pl-s">"@babel/env"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
            <span class="pl-s">"targets"</span>: <span class="pl-kos">{</span>
                <span class="pl-s">"browsers"</span>: <span class="pl-kos">[</span><span class="pl-s">"&gt; 1%"</span><span class="pl-kos">,</span> <span class="pl-s">"ios &gt;= 8"</span><span class="pl-kos">,</span> <span class="pl-s">"android &gt;= 4.4"</span><span class="pl-kos">,</span> <span class="pl-s">"not ie &lt; 99"</span><span class="pl-kos">,</span> <span class="pl-s">"not edge &lt; 99"</span><span class="pl-kos">]</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-s">"useBuiltIns"</span>: <span class="pl-s">"usage"</span><span class="pl-kos">,</span>
            <span class="pl-s">"loose"</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> 
            <span class="pl-s">"modules"</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
          <span class="pl-kos">}</span>
      <span class="pl-kos">]</span><span class="pl-kos">,</span> 
    <span class="pl-s">"@babel/preset-react"</span>
    <span class="pl-kos">]</span><span class="pl-kos">,</span>
    <span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span>
      <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-proposal-decorators"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"legacy"</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
      <span class="pl-kos">[</span>
        <span class="pl-s">"@babel/plugin-proposal-class-properties"</span><span class="pl-kos">,</span>
        <span class="pl-kos">{</span>
          <span class="pl-s">"noMangle"</span>: <span class="pl-c1">true</span>
        <span class="pl-kos">}</span>
      <span class="pl-kos">]</span><span class="pl-kos">,</span>
      <span class="pl-s">"@babel/plugin-transform-modules-commonjs"</span>
    <span class="pl-kos">]</span><span class="pl-kos">,</span>
    <span class="pl-s">"ignore"</span>: <span class="pl-kos">[</span>
      <span class="pl-s">"node_modules/**/*.js"</span>
    <span class="pl-kos">]</span><span class="pl-kos">,</span>
    <span class="pl-s">"env"</span>: <span class="pl-kos">{</span>
      <span class="pl-s">"test"</span>: <span class="pl-kos">{</span>
        <span class="pl-s">"sourceMaps"</span>: <span class="pl-s">"inline"</span>
      <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>
  </pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>@babel/core: "7.2.2"</li>
<li>Node 8/npm 6</li>
<li>macOS 10.14.1</li>
<li>no</li>
<li>babel-loader: 8.0.4</li>
</ul>