babel-maven-plugin icon indicating copy to clipboard operation
babel-maven-plugin copied to clipboard

Spread operator not transpiling to es5

Open estermer opened this issue 4 years ago • 2 comments

I was wondering what kind of presets were available. Your docs do not mention how to add other preset versions.

The reason I ask is the es2015 is transpiling most of the code to es5 but it is not transoiling destructing or the ...rest operator.

I was unsure how to handle that... any tips?

estermer avatar Nov 22 '21 15:11 estermer

It looks like I need to use preset-env as the preset option but I am unable to figure out how to add that since just setting the option is not a valid preset...

estermer avatar Nov 29 '21 14:11 estermer

Alright I asked this question on stack overflow and I found out the answer so I posted the answer here

Basically to get the preset option for @babel/preset-env I just need to pass in env

I propose that the documentation in the README.md reflect that as the default rather that es2015

OR

I propose that the list of potential presets be listed env, flow, typescript, react

estermer avatar Nov 30 '21 15:11 estermer