Unexpected usage via CommonJS
timwis opened this issue · 2 comments
timwis commented
If you want to use this library via CommonJS, you need to use the default
property on the object it exports.
Expected functionality:
var HyperList = require('hyperlist')
At this point, HyperList
will be an object with a default
property. The default
property contains the actual HyperList
object described in the documentation.
Current work-around:
var HyperList = require('hyperlist').default
I assume this has to do with however you're translating the ES2015 export
into CommonJS as this line appears to be the culprit.
tbranyen commented
@timwis Thanks for the issue, this was an oversight, https://www.npmjs.com/package/babel-plugin-add-module-exports should be added to produce a more usable CJS
timwis commented
Okay, I'll throw together a PR