soda-js
soda-js copied to clipboard
Requiring eventemitter2 breaks webpack
https://github.com/webpack/webpack/issues/43
Based on the above issue, I think the fix, when requiring eventemitter2 is to:
var ee2Lib = require('eventemitter2'), EventEmitter = ee2Lib.EventEmitter2 || ee2Lib
Appears the library has 2 interfaces, one for AMD and one for CommonJS
I was able to test this locally and it worked. I no longer got the error:
Uncaught TypeError: EventEmitter is not a constructor
This worked for me. @jasonlally has a PR been opened for this?