|
|
|
|
|
by alangpierce
3471 days ago
|
|
I think the word "target" in the question is unclear, or at least has been misinterpreted. Many of the answers here seem to be about why you would write your source code in ES6, but at least to me, the "target" code is the code that actually ends up executing (whether on the server or in the user's browser or whatever). I think it all depends on your context and use case. If you're running code on the server, there's no reason to compile down to ES5 if you know that your node version can run your code without modification. At my company, we write browser-based tools for scientists, so we have a bit more flexibility in asking users to use modern browsers. We still use babel and target ES5, but we may move off of it before normal consumer websites do. |
|
Actually, ES6 is not running at full speed in Node yet. So there are still some performance benefits on transpiling.