toddmotto / ama

Ask me anything!
20 stars 3 forks source link

Running ES6 on unsupported browsers #34

Closed whizkydee closed 8 years ago

whizkydee commented 8 years ago

Hi @toddmotto,

With the trending arrival of ES6, I've always been worried on how to implement it on unsupported browsers. Are there any polyfills you would recommend? I stumbled upon this repo but i presume it doesn't support all the features of ES6. Are there any alternatives for total browser support?

Thanks.

toddmotto commented 8 years ago

I'd 100% use Babel to transpile your ES6 down to ES5: https://babeljs.io/

On 21 May 2016 at 02:14, Olaolu Olawuyi notifications@github.com wrote:

Hi @toddmotto https://github.com/toddmotto,

With the trending arrival of ES6, I've always been worried on how to implement it on unsupported browsers. Are there any polyfills you would recommend? I stumbled upon this repo https://github.com/paulmillr/es6-shim but i presume it doesn't support all the features of ES6. Are there any alternatives for total browser support?

Thanks.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/toddmotto/ama/issues/34

@toddmotto

whizkydee commented 8 years ago

Thanks @toddmotto,

I guess I understand how it works. You write in ES6, but then it converts it to browser-readable code. But does it work for all features? I mean are there cases where it doesn't convert correctly?

toddmotto commented 8 years ago

Chrome basically supports everything ES6 anyway, so you're really doing it for non-ES6 feature browsers.

whizkydee commented 8 years ago

@toddmotto

Thanks, even Firefox supports all features of ES6. But not all versions of these browsers support ES6 as you know.