angular-websocket icon indicating copy to clipboard operation
angular-websocket copied to clipboard

Failure on web client when using browserify + ws 1.1.0

Open fluggo opened this issue 9 years ago • 3 comments

I don't know what exactly the failure is; maybe it's because ws 1.1.0 doesn't include the client side anymore? Whatever the reason, trying to use angular-websocket 1.1.0 on the client side through browserify while ws 1.1.0 is installed on the server side doesn't work. Downgrading to angular-websocket 1.0.14 fixes it.

fluggo avatar May 16 '16 05:05 fluggo

Same issue here, using webpack 1.13.1, seems like it will require ws anyway when require this module using webpack. Then lots of NodeJS module cannot resolve error occurred after require ws.

xiaoyuze88 avatar Aug 11 '16 10:08 xiaoyuze88

after digging in the generated code (dist), the require('ws') is no longer wrapped in a if block, that why module bundler try to require ws module. I will try to see how can it could be fixed

lionelB avatar Oct 14 '16 19:10 lionelB

see https://github.com/AngularClass/angular-websocket/blob/master/dist/angular-websocket.js#L5

lionelB avatar Oct 14 '16 19:10 lionelB