<p dir="auto">Say I want to write code for io.js, and I want to use ES6 generators. But I also want to use some other features that io.js <a href="http://kangax.github.io/compat-table/es6/#iojs" rel="nofollow">doesn't support yet</a>, like rest parameters and destructuring assignments. Enter Babel.</p>
<p dir="auto">Is there some way I can use Babel to compile my code, but tell it not to compile the generators, just leave them as they are? This way my app would be running real generators natively – the benefits of which are (1) it should be faster, (2) no regenerator/runtime dep, (3) compiled code is more readable, (4) stack traces would be clearer.</p>
<p dir="auto">It would be awesome if there was a way to tell Babel exactly which platform I'm targeting, and it would do only the minimal transformations needed to compile down my ES.next source code for that particular platform, based on knowledge from the <a href="http://kangax.github.io/compat-table/es6/" rel="nofollow">compatibility table</a>.</p>
<p dir="auto">Possibly through a <code class="notranslate">blacklistUserAgent</code> option or something. Would use the kangax compat-table. Important to note that it does not guarantee complete spec compliancy on the vendors end.</p>
<p dir="auto">References:</p>
<ul dir="auto">
<li><a href="https://github.com/kangax/compat-table">https://github.com/kangax/compat-table</a></li>
<li><a href="https://github.com/Fyrd/caniuse">https://github.com/Fyrd/caniuse</a></li>
<li><a href="https://github.com/3rd-Eden/useragent">https://github.com/3rd-Eden/useragent</a></li>
</ul>