You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Babel 7 with es2015 preset incorrectly destructures from imported module. #6373
And a module that imports the object and then destructures it into multiple objects:
import{NestedObjects}from"./some-module"const{ Foo, Bar }=NestedObjects
Babel Configuration
{"presets": ["es2015"]}
Expected Behavior
I would expect both Foo and Bar to be taken from _someModule.NestedObjects.
Current Behavior
Only the first destructured object is resolved correctly _someModule.NestedObjects.Foo, the following object loses the module reference NestedObjects.Bar.
Possible Solution
I have not had the time yet to drill it down to the specific plugin in the es2015 preset that causes this, so that should probably be the first avenue to explore. I will update this ticket if I do find time to debug more before someone else has had the opportunity to do so.
Context
Our React Native project tries to use this library, which currently fails the build.
Hey @alloy! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
Activity
babel-bot commentedon Oct 3, 2017
Hey @alloy! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
orta commentedon Oct 3, 2017
Nice response @babel-bot, I should steal this and get it on CocoaPods' peril.
hzoo commentedon Oct 3, 2017
REPL on master (you can use /repl/build/master to test what the current state of master is)