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.
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.
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.
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/