Preset didn't include "transform-es2015-destructuring" when required
abritinthebay opened this issue · 4 comments
I'm running Node v6.9.1 and my code wouldn't transform without this plugin being added additionally to latest-minimal.
Thoughts? Could be something odd on my end but I don't know what.
This is odd as transform-es2015-destructuring
is inlcuded in both latest
and latest-minimal
.
Can you please share your working config, non-working config and the error trace? I will try to help.
All I have (in package.json) is this babel setup:
"babel": {
"ignore": [
"node_modules/**"
],
"presets": [
"latest-minimal",
"stage-1",
"react"
],
"plugins": [
"transform-es2015-destructuring"
]
},
The error was just a standard "unexpected token" message.
This is odd given node 6.9.1 supports destructuring out of the box. Adding ´transform-es2015-destructuring´ should not be necessary at all.
Can you please share the piece of code that was breaking and led you to add that plugin?
After some investigation over the weekend I think it's a webpack munging issue. Not sure why, but the code works if I run it with the babel cli rather than through webpack.
Going to close this out as it's not directly related to this project.
I agree though - it's quite strange.