-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having problems with Spread Operator #13
Comments
This is nothing to do with language-babel. That message is passed back from the Babel API. I would imagine you would also get this message from the Babel CLI. You have to enable the spread transformer es6.spread or set the stage to enable it. Either use the babelrc files or set via settings. |
spread as a lhs? |
I'm using webpack so I just disabled the transpile and that's it, but I'm still wondering about it, I was using a destructuring with "..." to keep the props and with webpack is working well. And... Sorry may I ask What is lhs? |
Left-hand side |
The LHS spread should be an array. |
Sorry I misunderstood what you were doing. Yes this should work if the correct stage is set in either babelrc or settings. |
ooooo yes, but I'm using destructuring also https://babeljs.io/docs/learn-es2015/#destructuring like this
|
yeah, but I don't know where to put it on settings, Just now I think I broke Atom. |
This is experimental stage 1 or use transformer es7.objectRestSpread https://github.com/sebmarkbage/ecmascript-rest-spread You can set this in .babelrc file or language-babel settings. In language Babel's settings put es7.objectRestSpread in the Optional Transformers field Or use stage 1 I've never used the webpack loader so I don't know why this works without these settings. I may have a look given time. |
Thanks a lot!!!
|
Hi,
I just came to Atom world from Sublime and I'm trying to compile a .jsx component and when I try to save it always appears this message
The line that is broking
Referring the spread operator.
The text was updated successfully, but these errors were encountered: