<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong></p>
<p dir="auto">Babel insert unnecessary polyfills in code for node in new version</p>
<p dir="auto"><strong>Input Code</strong></p>
<ul dir="auto">
<li>REPL or Repo link if applicable:</li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="console.log({}.toString)"><pre class="notranslate"><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">.</span><span class="pl-c1">toString</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">Run:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="node_modules/.bin/babel test.js"><pre class="notranslate">node_modules/.bin/babel test.js</pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Warning about core-js
&quot;use strict&quot;;

require(&quot;core-js/modules/es6.object.to-string&quot;);

console.log({}.toString);"><pre class="notranslate"><code class="notranslate">// Warning about core-js
"use strict";

require("core-js/modules/es6.object.to-string");

console.log({}.toString);
</code></pre></div>
<p dir="auto">Looks like regression because previously we don't have polyfills in code.</p>
<p dir="auto"><strong>Expected behavior/code</strong></p>
<p dir="auto">No unnecessary polyfills</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/preset-env&quot;,
        {
          &quot;targets&quot;: {
            &quot;node&quot;: &quot;6.9.0&quot;
          },
          &quot;useBuiltIns&quot;: &quot;usage&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/preset-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">"node"</span>: <span class="pl-s">"6.9.0"</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-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 version(s): latest (<code class="notranslate">babel-preset-env: 7.4.2</code>)</li>
<li>Node/npm version: v10.15.0</li>
<li>OS: Ubuntu 18.10</li>
<li>Monorepo: no</li>
<li>How you are using Babel: <code class="notranslate">cli</code></li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto">No</p>
<p dir="auto"><strong>Additional context/Screenshots</strong></p>
<p dir="auto">No</p>
<p dir="auto">Hello, I am using Serverless Framework and GitLab CI to deploy my react-app</p>
<p dir="auto">I am able to build deploy from my machine, but when setting it up on GitLab CI, I got the following error:<br>
'loose' mode configuration must be the same for both @babel/plugin-proposal-class-properties and @babel/plugin-proposal-private-methods</p>
<p dir="auto">This error does not appear on my local machine, so I am not sure what's going on.<br>
I also don't have plugin-proposal-private-methods anywhere in package.json, so I am not sure which babel package depends on it.</p>
<p dir="auto">Here is my package.json</p>
<p dir="auto"><code class="notranslate">"devDependencies": { "@babel/core": "^7.6.4", "@babel/plugin-proposal-class-properties": "^7.5.5", "@babel/plugin-transform-react-jsx": "^7.3.0", "@babel/plugin-transform-runtime": "^7.6.2", "@babel/runtime": "^7.6.3", "babel-preset-nano-react-app": "^0.1.0", "cssnano": "^4.1.10", "parcel-bundler": "^1.11.0", "parcel-plugin-clean-dist": "0.0.6" }, "babel": { "presets": [ "nano-react-app" ], "plugins": [ [ "@babel/plugin-proposal-class-properties", { "loose": true } ], [ "@babel/plugin-transform-react-jsx", { "pragmaFrag": "React.Fragment" } ] ] } }</code></p>
<p dir="auto">Thanks for the help in advance!<br>
Ganda</p>