[chore] Use more-specific imports for StealJS compatibility (#467)

This allows browser loaders like StealJS to load this package without showing any errors or warnings in the console (since you the only way to check if a file exists from the browser it to request it, node-style folder assumptions can't be made without potential 404s.)

The package works fine with the StealJS build tools, since they're node based, but this lets allows it to work with the browser version.
This commit is contained in:
Marshall Thompson
2016-10-20 10:10:30 -06:00
committed by Damien Arrachequesne
parent eb24245565
commit 6b2b3bdaaa
2 changed files with 3 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
module.exports = require('./lib/');
module.exports = require('./lib/index');

View File

@@ -2,7 +2,7 @@
* Module dependencies.
*/
var transports = require('./transports');
var transports = require('./transports/index');
var Emitter = require('component-emitter');
var debug = require('debug')('engine.io-client:socket');
var index = require('indexof');
@@ -126,7 +126,7 @@ Socket.protocol = parser.protocol; // this is an int
Socket.Socket = Socket;
Socket.Transport = require('./transport');
Socket.transports = require('./transports');
Socket.transports = require('./transports/index');
Socket.parser = require('engine.io-parser');
/**