From 3c9431b2fcc07fdd44f9d2356942524970d114f2 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 3 Mar 2015 15:50:21 -0500 Subject: [PATCH] socket.io/plugin updated instructions to use require.main.require instead --- src/socket.io/plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket.io/plugins.js b/src/socket.io/plugins.js index 52dfeecc69..a4ee9bbe89 100644 --- a/src/socket.io/plugins.js +++ b/src/socket.io/plugins.js @@ -7,7 +7,7 @@ var SocketPlugins = {}; How? From your plugin: - var SocketPlugins = module.parent.require('./socket.io/plugins'); + var SocketPlugins = require.main.require('./src/socket.io/modules'); SocketPlugins.myPlugin = {}; SocketPlugins.myPlugin.myMethod = function() { ... };