<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ x] feature request"><pre class="notranslate"><code class="notranslate">[ x] feature request
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
Angular (and all its dependencies) are compiled down to ES5</p>
<p dir="auto"><strong>Expected behavior</strong><br>
Compile everything down to ES2015. I (and more and more Angular users) am only supporting evergreen browsers. Those all have 95%+ support of es6, heck most have even es2016, and es2017 features are getting close too!</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Using ES6 over es5 has the following:</p>
<ol dir="auto">
<li>smaller runtime</li>
<li>less (to none) polyfills</li>
<li>faster execution. (I know not everything is faster now, actually for a lot of features it's actually opposite, but browsers are improving really fast, an ES6 support is getting faster and faster. This is high on the agenda of browser vendors)</li>
<li>did I mention SMALLER runtime yet?</li>
<li>easier to shake (I'm not too sure on this though.)</li>
<li>the happy feeling of using modern, up to date stuff</li>
<li>much smaller source maps, so faster for development too.</li>
<li>more readable code in the runtime</li>
</ol>
<p dir="auto">To be clear, what I want is an Angular runtime that targets ES2015+ instead of ES5. I know I can do this for my portion of a project, but what I want is to ship an entire ES6 app to the browser. When your target is modern browsers, you should ship modern JS.</p>
<p dir="auto">With v4, angular starts to ship ES6 code as part of its npm packages. However, Angular's compiler has no option to output ES6 code, only TypeScript code (for AOT) or ES5 code (for JIT).</p>
<p dir="auto">Also, our metadata collection is broken for JIT and native ES6 mode (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="215593558" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/15325" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/15325/hovercard" href="https://github.com/angular/angular/issues/15325">#15325</a>).</p>
<p dir="auto">Add an option to allow to use ES6 in both cases.</p>