socket.io-p2p icon indicating copy to clipboard operation
socket.io-p2p copied to clipboard

window.myDebug causes break in webpack dev server

Open caranicas opened this issue 9 years ago • 2 comments

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?

caranicas avatar Jun 01 '16 22:06 caranicas

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

jeancode avatar Apr 20 '18 06:04 jeancode

@jeancode, in the index.js file.

gilfuser avatar Aug 24 '18 21:08 gilfuser