Skip to content

can't import es6modules that have a single component  #185

Closed
@catmando

Description

@catmando

If an es6 module has a single component (and its set to the default for the module) we don't automatically import it.

Fix is to add this check in ReactWrapper.eval_native_component

component = `component.default` if `component.__esModule` 

workaround is to either use the import directive in the manifest (which takes care of this case) or do a require('foo').default

see for details
https://stackoverflow.com/questions/40294870/module-exports-vs-export-default-in-node-js-and-es6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions