Transpiling Array.prototype.flat away with @babel? : <p>I inadvertently introduced a backwards compatibility issue in my React app by using <code>Array.prototype.flat</code>. I was very surprised this didn't get resolved by transpiling - I thought this would result in es2015 compatible code.</p>

<p>How can I get Babel 7 to transpile this? (If my reading of the sources is right in Babel 6 there was still a plugin for this but since this has begun to roll out to browsers support has been dropped?)</p>

<p>Tools:</p>

<ul>
<li>@babel/core@7.0.0</li>
<li>webpack@4.18.0</li>
</ul>

<p>My top-level configuration files look like this:</p>

<h3>webpack.config.js</h3>

<pre><code>var path = require('path')

module.exports = {
  entry: "./src/index.js",
  output: {
      path: path.join(__dirname, 'dist', 'assets'),
      filename: "bundle.js",
      sourceMapFilename: "bundle.map"
  },
  devtool: '#source-map',
  module: {
      rules: [
          {
              test: /\.js$/,
              exclude: /(node_modules)/,
              loader: 'babel-loader'
          }
      ]
  }}
</code></pre>

<h3>.babelrc</h3>

<pre><code>{
  "presets": [ "@babel/preset-env", "@babel/react" ],
  "plugins": [["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }]]
}
</code></pre>

<h3>.browserslistrc</h3>

<pre><code>chrome 58
ie 11
</code></pre>
