Closed janbaer closed 8 years ago
I just tried to use the function with require and this worked. But I would prefer to use it in the ES6 module way... Thanks!
Since we're not using ES2015 yet, you should import it as
import * as Github from 'github-api';
Can you try it and let me know?
Thanks for the tip. When I try this, I'm getting the following error message:
Github is not a constructor
This of ok, since I import Github not as class from which I can create an instance. But when I use Github.getRepo without creating an instance of Github before I'm getting another error:
Github.Repository is not a constructor"
It would be nice to use it also in the way how to import modules in the ES2015 way, but I can live with the commonjs syntax since webpack is supporting both
@janbaer Thanks for the feedback. ES2015 imports should be available in the forthcoming v1.0.0
@janbaer v1.0.0
is out, are you still affected?
I'm trying to use your Github api in a ES6 environment with webpack and gulp.
When I'm trying to import the Github function with the following code
I'm just getting these error: _githubApi.Github is not a constructor"