You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
This means it exports {EventEmitter2: function() {/*...*/}} in node.js through the CommonJs part and function() {/*...*/} in the AMD part. This is a bit weird in the library.
You can import it with var ee2Lib = require("eventemitter2"), EventEmitter2 = ee2Lib.EventEmitter2 || ee2Lib; to support both types of exports.
Activity
sokra commentedon Dec 2, 2012
It does work for me.
My testcase (test.js):
http://localhost:8080
It is exported by the AMD part of the module:
This means it exports
{EventEmitter2: function() {/*...*/}}in node.js through the CommonJs part andfunction() {/*...*/}in the AMD part. This is a bit weird in the library.You can import it with
var ee2Lib = require("eventemitter2"), EventEmitter2 = ee2Lib.EventEmitter2 || ee2Lib;to support both types of exports.sokra commentedon Jan 23, 2013
I close this issue, please reopen if you still have an issue...
fix(html): read a `<script type>` decoded, and trim an inline script
fix(html): drop the inline-script trim, keep the decoded type
fix(html): read a <script type> decoded, and trim an inline script (#…