<h2 dir="auto">Feature request</h2>
<p dir="auto">webpack 5 currently makes <code class="notranslate">output.ecmaVersion</code> default to <code class="notranslate">6</code>. This can create issues for projects needing to support older browsers like IE 11.<br>
Many projects (including Babel's preset-env) have moved in the direction of relying on a shared browserslist config to avoid duplicating the browser support info. It would be great if webpack could rely this info as well, to select the <code class="notranslate">output.ecmaVersion</code> automatically by default</p>
<p dir="auto">Initially suggested in the beta feedback at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="505838433" data-permission-text="Title is private" data-url="https://github.com/webpack/webpack/issues/9802" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/9802/hovercard?comment_id=588896560&amp;comment_type=issue_comment" href="https://github.com/webpack/webpack/issues/9802#issuecomment-588896560">#9802 (comment)</a></p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong></p>
<p dir="auto">Devs will get a working build by default without even having to know that the <code class="notranslate">output.ecmaVersion</code> config setting exists. This goes in the direction of 0-config.</p>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vankop/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vankop">@vankop</a> and @evilebottnawi have discussed some implementation suggestions in comments following the one I linked above.</p>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong><br>
I don't really have time right now, so no guarantee.</p>
<h2 dir="auto">Feature request</h2>
<p dir="auto">Infer <code class="notranslate">output.ecmaVersion</code> from browserlist</p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">By default, <code class="notranslate">output.ecmaVersion</code> should be getting by browserlist</p>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong></p>
<p dir="auto">Automatization</p>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong></p>
<p dir="auto">Add browserlist and use it when webpack starts</p>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong></p>
<p dir="auto">yes</p>