socketio / socket.io-p2p

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

window.myDebug causes break in webpack dev server

caranicas opened this issue · 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?

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

@jeancode, in the index.js file.