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

Allow for different export patterns. #7

Closed
jamestalmage opened this issue May 3, 2016 · 2 comments
Closed

Allow for different export patterns. #7

jamestalmage opened this issue May 3, 2016 · 2 comments

Comments

@jamestalmage
Copy link
Contributor

The string only option does not fit RxJs.

You can't do:

require('rxjs/Observable');

You need to do:

require('rxjs/Observable').Observable;

I think our default lookup strategy should be something like this:

function load(name) {
  var loaded = require(name);
  return loaded.Observable || loaded.default || loaded;
}
@sindresorhus
Copy link
Owner

We already manually handle that for RxJS, but yeah, might be useful for other future libs.

@jamestalmage
Copy link
Contributor Author

No, we only do that in the detect() function. That won't work if they call register('rxjs')

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

No branches or pull requests

2 participants