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
Problems requiring EventEmitter2 in browser #43
Comments
It does work for me. My testcase (test.js): var ee = require("./lib/eventemitter2");
document.write(ee.toString());
var test = new ee();
document.write("<br>");
document.write(JSON.stringify(test));
It is exported by the AMD part of the module: // ...
if (typeof define === 'function' && define.amd) {
define(function() {
return EventEmitter;
});
} else {
exports.EventEmitter2 = EventEmitter;
}
// ... This means it exports You can import it with |
I close this issue, please reopen if you still have an issue... |
I want to use EventEmitter2 from hij1nx. While in node context it works in browser context it is undefined.
Probably the last line of the module breaks webpack
Do you have any idea or solution how to solve this problem?
The text was updated successfully, but these errors were encountered: