Use ES6 modules
Tried to use node-ib with Webpack (disabled net temporarily), still getting this error:
Uncaught (in promise) Error: Cannot find module './contract'.
It is caused by this line.
This patch seems to work:
IB.prototype.contract = require('./contract/index');
IB.prototype.order = require('./order/index');
IB.prototype.util = require('./util');
But, any plans to use modern ES6 modules?
@claude2 No immediate plan but I hope to see this library rewritten in TypeScript 2.
@claude2 Removed dynamic require in v0.1.16. Please try again and let me know if it still has any problem with webpack/browserify.
Thanks you for the fix, it resolved the modules error. The net-related error is still there. I left a comment in #75 since it's more on topic.
@claude2 Please see the comment https://github.com/pilwon/node-ib/issues/75#issuecomment-257071116