Skip to content
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

can`t user es7 destructuring assignments #1221

Closed
John-Oldman-Wang opened this issue Apr 20, 2018 · 2 comments
Closed

can`t user es7 destructuring assignments #1221

John-Oldman-Wang opened this issue Apr 20, 2018 · 2 comments

Comments

@John-Oldman-Wang
Copy link

John-Oldman-Wang commented Apr 20, 2018

Choose one: is this a 🐛 bug report or 🙋 feature request?

🎛 Configuration (.babelrc, package.json, cli command)

mian.js

var { a, b, ...other } = { a: 1, b: 2, c: 3, d: 4 }

.babelrc

{
    "presets": [
        "es2015",
        "react"
    ]
}

🤔 Expected Behavior

😯 Current Behavior

parcel ./main.js

💁 Possible Solution

🔦 Context

💻 Code Sample

🌍 Your Environment

Software Version(s)
Parcel 1.7.1
Node 8.11.1
npm/Yarn npm 5.6.0
Operating System windows10
@John-Oldman-Wang John-Oldman-Wang changed the title can`t user es6 destructuring assignments can`t user es7 destructuring assignments Apr 20, 2018
@bary12
Copy link

bary12 commented Apr 22, 2018

Object rest spread (...other) is an experimental feature available through Babel Preset Stage 3 or as a standalone plugin and is not shipped with babel-preset-es2015. add either the stage 3 preset or the plugin to your .babelrc file.

@edmorley
Copy link

Object rest spread is now stage 4:
https://github.com/tc39/proposal-object-rest-spread#status-of-this-proposal

...and included in Babel 7's @babel/preset-env (as of v7.0.0-beta.3):
https://github.com/babel/babel/blob/21b03c35d38f1d18cb535434e76defbc803b77a3/packages/babel-preset-env/data/plugins.json#L227-L235

As such this will be fixed by #868.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants