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 import es6modules that have a single component #185

Closed
catmando opened this issue May 3, 2019 · 0 comments
Closed

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

catmando opened this issue May 3, 2019 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@catmando
Copy link
Contributor

catmando commented May 3, 2019

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

@catmando catmando added the bug Something isn't working label May 3, 2019
@catmando catmando added this to the alpha1.5 milestone May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant