Can I support all ES5, ES6, ES7 features?

448 views Asked by At

Are there any ways to config a Reactjs project to support all ES5, ES6, ES7 features?

I mean that I can write all the ES5, ES6, ES7 syntaxes.

I am using babel and webpack.

2

There are 2 answers

0
GG. On

Yes, with the Babel preset-latest. It contains ES6, ES7 and ES8 (async/await).

See the doc to how to install it and how to disable ES8 if you don't need it.

0
Andrés Andrade On

Here you will find more information about setting up ES7 using babel + webpack:

http://jamesknelson.com/using-es6-in-the-browser-with-babel-6-and-webpack/