socketio / socket.io-p2p

MIT License
1.02k stars 180 forks source link

window.myDebug causes break in webpack dev server #27

Open caranicas opened 8 years ago

caranicas commented 8 years ago

I am trying to get this to work but when I try import P2P from 'socket.io-p2p'; webpack rebuilds and spits this at me

window.myDebug = __webpack_require__(18)
    ^

ReferenceError: window is not defined

i went to explore the source and found this

window.myDebug = require('debug') right above var debug = require('debug')('socket') I went in and manually removed it, and now it will build, but I am wondering why it is there in the first palce, and if there is a better way to handle that?

jeancode commented 6 years ago

genial me gustaría saber en que archivo encontraste window.myDebug = require('debug')

gilfuser commented 5 years ago

@jeancode, in the index.js file.