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

interopDefault fails if imported module is a non-object #474

Closed
Rich-Harris opened this issue Jan 27, 2016 · 1 comment · Fixed by #491
Closed

interopDefault fails if imported module is a non-object #474

Rich-Harris opened this issue Jan 27, 2016 · 1 comment · Fixed by #491

Comments

@Rich-Harris
Copy link
Contributor

If you have a situation like this...

// node_modules/external-dependency/index.js
module.exports = 'a string';

// main.js
import x from 'external-dependency'

...the interopDefault function searches for default inside 'a string' when the bundle runs. Need to check it's a non-null object.

@borisirota
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants