Cloneable/runnable example can be found here.
Given a module that exports an object:
export const NestedObjects = {
Foo: "whatevs",
Bar: "whatevs",
}
And a module that imports the object and then destructures it into multiple objects:
import { NestedObjects } from "./some-module"
const { Foo, Bar } = NestedObjects
{
"presets": ["es2015"]
}
I would expect both Foo
and Bar
to be taken from _someModule.NestedObjects
.
Only the first destructured object is resolved correctly _someModule.NestedObjects.Foo
, the following object loses the module reference NestedObjects.Bar
.
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.
Our React Native project tries to use this library, which currently fails the build.
| software | version(s)
| ---------------- | -------
| Babel | 7.0.0-beta.2
| node | 8.4.0
| npm | 5.3.0
| Operating System | Mac OS X 10.12.5
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.
Nice response @babel-bot, I should steal this and get it on CocoaPods' peril.
REPL on master (you can use /repl/build/master to test what the current state of master is)