<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Input Code</strong></p>
<p dir="auto"><a href="https://babeljs.io/repl#?babili=false&amp;browsers=&amp;build=&amp;builtIns=false&amp;spec=false&amp;loose=false&amp;code_lz=MYewdgzgLgBAhgJwQRhgXhgbQHS4IJJwCeAFAEwCUAugFCiSyIJnowELHkUDcd408JAGZWOXEzJVuQA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=false&amp;fileSize=false&amp;timeTravel=false&amp;sourceType=module&amp;lineWrap=true&amp;presets=env&amp;prettier=true&amp;targets=&amp;version=7.6.4&amp;externalPlugins=" rel="nofollow">REPL</a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const arr1 = [...Array(2)]
const arr2 = Array(2);
const arr3 = [...arr2];"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">arr1</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span>...<span class="pl-v">Array</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">]</span>
<span class="pl-k">const</span> <span class="pl-s1">arr2</span> <span class="pl-c1">=</span> <span class="pl-v">Array</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">arr3</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span>...<span class="pl-s1">arr2</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Current Behavior</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var arr1 = _toConsumableArray(Array(2)); // [undefined, undefined]
var arr2 = Array(2); // [empty × 2]
var arr3 = [].concat(arr2); // [empty × 2]"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">arr1</span> <span class="pl-c1">=</span> <span class="pl-en">_toConsumableArray</span><span class="pl-kos">(</span><span class="pl-v">Array</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// [undefined, undefined]</span>
<span class="pl-k">var</span> <span class="pl-s1">arr2</span> <span class="pl-c1">=</span> <span class="pl-v">Array</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// [empty × 2]</span>
<span class="pl-k">var</span> <span class="pl-s1">arr3</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">concat</span><span class="pl-kos">(</span><span class="pl-s1">arr2</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// [empty × 2]</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var arr1 = _toConsumableArray(Array(2)); // [undefined, undefined]
var arr2 = Array(2); // [empty × 2]
var arr3 = _toConsumableArray(arr2); // [undefined, undefined]"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">arr1</span> <span class="pl-c1">=</span> <span class="pl-en">_toConsumableArray</span><span class="pl-kos">(</span><span class="pl-v">Array</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// [undefined, undefined]</span>
<span class="pl-k">var</span> <span class="pl-s1">arr2</span> <span class="pl-c1">=</span> <span class="pl-v">Array</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// [empty × 2]</span>
<span class="pl-k">var</span> <span class="pl-s1">arr3</span> <span class="pl-c1">=</span> <span class="pl-en">_toConsumableArray</span><span class="pl-kos">(</span><span class="pl-s1">arr2</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// [undefined, undefined]</span></pre></div>
<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/preset-env&quot;]
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-s">"@babel/preset-env"</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 version(s): v7.6.4</li>
</ul>
<p dir="auto">bug report</p>

<h3 dir="auto">Input Code</h3>


<p dir="auto">N/A</p>
<h3 dir="auto">Babel Configuration (.babelrc, package.json, cli command)</h3>

<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// .babelrc, applicable code only
// using babel-preset-env v1.6.0
// using browserslist 2.5.1
{
  &quot;presets&quot;: [[&quot;env&quot;, {
    &quot;modules&quot;: false,
    &quot;debug&quot;: true,
    }]]
}"><pre class="notranslate"><span class="pl-ii">// .babelrc, applicable code only</span>
<span class="pl-ii">// using babel-preset-env v1.6.0</span>
<span class="pl-ii">// using browserslist 2.5.1</span>
{
  <span class="pl-ent">"presets"</span>: [[<span class="pl-s"><span class="pl-pds">"</span>env<span class="pl-pds">"</span></span>, {
    <span class="pl-ent">"modules"</span>: <span class="pl-c1">false</span>,
    <span class="pl-ent">"debug"</span>: <span class="pl-c1">true</span>,
    }]]
}</pre></div>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// code in package.json 
  &quot;browserslist&quot;: [
    &quot;last 2 Chrome versions&quot;,
    &quot;last 2 Opera versions&quot;,
    &quot;last 2 Firefox versions&quot;,
    &quot;last 2 Edge versions&quot;,
    &quot;last 2 Safari versions&quot;,
    &quot;last 2 iOS versions&quot;,
    &quot;last 2 ChromeAndroid versions&quot;
  ]"><pre class="notranslate"><span class="pl-ii">// code in package.json </span>
  <span class="pl-ent">"browserslist"</span>: [
    <span class="pl-s"><span class="pl-pds">"</span>last 2 Chrome versions<span class="pl-pds">"</span></span>,
    <span class="pl-s"><span class="pl-pds">"</span>last 2 Opera versions<span class="pl-pds">"</span></span>,
    <span class="pl-s"><span class="pl-pds">"</span>last 2 Firefox versions<span class="pl-pds">"</span></span>,
    <span class="pl-s"><span class="pl-pds">"</span>last 2 Edge versions<span class="pl-pds">"</span></span>,
    <span class="pl-s"><span class="pl-pds">"</span>last 2 Safari versions<span class="pl-pds">"</span></span>,
    <span class="pl-s"><span class="pl-pds">"</span>last 2 iOS versions<span class="pl-pds">"</span></span>,
    <span class="pl-s"><span class="pl-pds">"</span>last 2 ChromeAndroid versions<span class="pl-pds">"</span></span>
  ]</pre></div>
<h3 dir="auto">Expected Behavior</h3>


<p dir="auto">The <code class="notranslate">babel-preset-env</code> should be able to use the settings from the browserslist config in package.json. This does not seem to work, though.</p>
<h3 dir="auto">Current Behavior</h3>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="babel-preset-env: `DEBUG` option

Using targets:
{}

Modules transform: false

Using plugins:
  check-es2015-constants {}
  transform-es2015-arrow-functions {}
  transform-es2015-block-scoped-functions {}
  transform-es2015-block-scoping {}
  transform-es2015-classes {}
  transform-es2015-computed-properties {}
  transform-es2015-destructuring {}
  transform-es2015-duplicate-keys {}
  transform-es2015-for-of {}
  transform-es2015-function-name {}
  transform-es2015-literals {}
  transform-es2015-object-super {}
  transform-es2015-parameters {}
  transform-es2015-shorthand-properties {}
  transform-es2015-spread {}
  transform-es2015-sticky-regex {}
  transform-es2015-template-literals {}
  transform-es2015-typeof-symbol {}
  transform-es2015-unicode-regex {}
  transform-regenerator {}
  transform-exponentiation-operator {}
  transform-async-to-generator {}
  syntax-trailing-function-commas {}"><pre class="notranslate"><code class="notranslate">babel-preset-env: `DEBUG` option

Using targets:
{}

Modules transform: false

Using plugins:
  check-es2015-constants {}
  transform-es2015-arrow-functions {}
  transform-es2015-block-scoped-functions {}
  transform-es2015-block-scoping {}
  transform-es2015-classes {}
  transform-es2015-computed-properties {}
  transform-es2015-destructuring {}
  transform-es2015-duplicate-keys {}
  transform-es2015-for-of {}
  transform-es2015-function-name {}
  transform-es2015-literals {}
  transform-es2015-object-super {}
  transform-es2015-parameters {}
  transform-es2015-shorthand-properties {}
  transform-es2015-spread {}
  transform-es2015-sticky-regex {}
  transform-es2015-template-literals {}
  transform-es2015-typeof-symbol {}
  transform-es2015-unicode-regex {}
  transform-regenerator {}
  transform-exponentiation-operator {}
  transform-async-to-generator {}
  syntax-trailing-function-commas {}
</code></pre></div>
<h3 dir="auto">Possible Solution</h3>


<h3 dir="auto">Context</h3>


<h3 dir="auto">Your Environment</h3>

<table role="table">
<thead>
<tr>
<th>software</th>
<th>version(s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babel</td>
<td>6.26.0</td>
</tr>
<tr>
<td>node</td>
<td>8.6.0</td>
</tr>
<tr>
<td><del>npm</del> yarn</td>
<td>1.2.1</td>
</tr>
<tr>
<td>Operating System</td>
<td>Windows 10 Fall Creators Update</td>
</tr>
</tbody>
</table>