I want to compile my code to ES6 not ES5. Here is my babelrc.
{
"presets": [
[
"env",
{
"modules": false,
"useBuiltIns": true,
"targets": {
"browsers": ["Chrome >= 60"]
}
}
],
["react"],
["stage-2"]
]}
And with babel-cli, the right ES6 code can be compiled. For example
But when I use webpack, babel-loader in the same babel config, my ES6 code was compiled to ES5.
So how can i compile ES6+ code to ES6+ with Webpack?
Does webpack compile ES6+ code to ES5 ?