mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
[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:
committed by
Damien Arrachequesne
parent
eb24245565
commit
6b2b3bdaaa
2
index.js
2
index.js
@@ -1,2 +1,2 @@
|
||||
|
||||
module.exports = require('./lib/');
|
||||
module.exports = require('./lib/index');
|
||||
|
||||
@@ -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');
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user