Search code examples
javascriptecmascript-6babeljsinternet-explorer-11ecmascript-5

Babel support explorer 11


My goal is to use ES6+, And still support Explorer 11.

I understand Babel provides the answer to purpose.

On the official website of Babel: https://babeljs.io/

I wrote an example:

enter image description here

I would expect the output of Babel will be :

var a = 5;

what am I missing?

Thank you all!


Solution

  • Babel by default uses browserslist with no polyfills. Those you will need to configure manually. If you want to toy around online, try using https://babeljs.io/repl, and make sure to enable everything according to your needs in the left sidebar.