This is a follow up on #141, however the problems we encounter are more far-reaching.
Among other things hxnodejs:
I'm not sure how to deal with this. As far as socket IO is concerned, I wonder though if the nodejs dependency is all that useful. From the looks of it, it really just uses EventEmitter.
Maybe this would work:
package js.npm.socketio;
#if nodejs
typedef EventEmitter<T> = js.node.events.EventEmitter;
#else
extern class EventEmitter<T> {
// ...
}
#end
I guess down the line the real question is though whether haxe-js-kit is really intended for pure browser development (i.e. not electron or some other environment that has access to the nodejs APIs).
This is a follow up on #141, however the problems we encounter are more far-reaching.
Among other things hxnodejs:
-D nodejswhich is whyhaxe.Httpwill attempt using the nodejs specific implementation in the browserBuffer(I believe you have to usehaxe.io.Bytesor something for that to happen) into the build and thus `require("buffer")I'm not sure how to deal with this. As far as socket IO is concerned, I wonder though if the nodejs dependency is all that useful. From the looks of it, it really just uses EventEmitter.
Maybe this would work:
I guess down the line the real question is though whether haxe-js-kit is really intended for pure browser development (i.e. not electron or some other environment that has access to the nodejs APIs).