I'm submitting a bug report
I'm submitting a feature request
- Library Version:
1.0.0-beta7
Please tell us about your environment:
-
Operating System:
all
-
Node Version:
6.2.0
-
Browser:
all
-
Language:
ESNext
-
Loader/bundler:
all
Current behavior:
Babel config specifies loose: true. This causes issues when using the spread (...) operator with a Set object. Specifically, the code:
this.foo = [...new Set([1, 2, 3])];
is transpiled to
this.foo = new Set([1, 2, 3]).concat();
This is a problem, as Set objects do not have a concat method. This transpilation is a consequence of having loose: true in .babelrc.js, per this issue: babel/babel#7958 . As mentioned in the linked issue, this is the expected behavior when using loose: true, and is not a bug in Babel or the spread transformer.
Simply setting loose: false will fix this issue.
This issue was originally reported on StackOverflow here: https://stackoverflow.com/questions/53696962/aurelia-not-transpiling-set-and-spread-operator-correctly
I'm submitting a bug report
I'm submitting a feature request
1.0.0-beta7
Please tell us about your environment:
Operating System:
all
Node Version:
6.2.0
8.11.3
Browser:
all
Language:
ESNext
Loader/bundler:
all
Current behavior:
Babel config specifies
loose: true. This causes issues when using the spread (...) operator with aSetobject. Specifically, the code:is transpiled to
This is a problem, as
Setobjects do not have aconcatmethod. This transpilation is a consequence of havingloose: truein.babelrc.js, per this issue: babel/babel#7958 . As mentioned in the linked issue, this is the expected behavior when usingloose: true, and is not a bug in Babel or the spread transformer.Simply setting
loose: falsewill fix this issue.This issue was originally reported on StackOverflow here: https://stackoverflow.com/questions/53696962/aurelia-not-transpiling-set-and-spread-operator-correctly
What is the expected behavior?
Spread operator to be transpiled correctly with
Setobjects.What is the motivation / use case for changing the behavior?
Make transpilation work correctly.