title: Webpack5 ES5 Terser compression configuration is incorrect
body: <blockquote>
  <p>Everything that can be configured is configured, but still cannot be converted to ES5</p>
  </blockquote>
  <pre class="lang-js prettyprint-override"><code>const path = require('path');
  
  module.exports = {
    entry: './src/index.js',
    mode: 'production',
    target: ['web', 'es5'],
    output: {
      environment: {
        arrowFunction: false,
        const: false,
        destructuring: false,
        forOf: false
      },
      filename: 'main.js',
      path: path.resolve(__dirname, 'dist'),
    },
  };
  </code></pre>
  <p>input code</p>
  <pre class="lang-js prettyprint-override"><code>const abc =  {
    c() {
      return {cc: 1}
    }
  }
  console.log(abc)
  </code></pre>
  <p>output code</p>
  <pre class="lang-js prettyprint-override"><code>console.log({c:()=&gt;({cc:1})}); // Hopefully there's no arrow function
  </code></pre>
  <p>Webpack target should actively configure Terser's options.compress.arrows = False if ES5 is present</p>
  <pre class="lang-js prettyprint-override"><code>terserOptions = {
    //...
  compress: {
      ecma: 5,
      // ...
      arrows: false,
    },
    // ..
  }
  </code></pre>
  <p>Error recurrence project
  <a href="https://github.com/chenyulun/webpack5-test" rel="nofollow noreferrer">https://github.com/chenyulun/webpack5-test</a></p>
  <blockquote>
  <p>yarn build</p>
  </blockquote>
  <p>I could have configured the terser-webpack-plugin myself, but I think Webpack with target set to ES5 should actively set this parameter (<code>compress.arrows</code> = false).</p>
  <p><a href="https://github.com/webpack/webpack/issues/16135" rel="nofollow noreferrer">#16135</a></p>