I import the socket.io module by:
import io from 'socket.io'
and then use webpack to pack it. I try to use the packed js file in html, but I found that the global is undefined at the place:
var BrowserWebSocket = global.WebSocket || global.MozWebSocket;
I am a newbie on it. Anyone can help me?