I want to compile my code for ES6, not ES5. Here is my babelrc.
{
"presets": [
[
"env",
{
"modules": false,
"useBuiltIns": true,
"targets": {
"browsers": ["Chrome >= 60"]
}
}
],
["react"],
["stage-2"]
]}
And with babel-cli you can compile the correct ES6 code. For instance,

But when I use the Web package , babel-loader in the same configuration babel, my code ES6 was compiled in ES5.
So how can I compile ES6 + code in ES6 + using Webpack?
Does webpack compile ES6 + code in ES5?
source
share