question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove `ws` from browser builds

See original GitHub issue

Currently, when installing autobahn with npm for use in the browser (ie. angular2), you need to manually install bufferutil and utf-8-validate to fulfill unmet dependencies by ws. Is there any reason why we can’t remove ws from browser builds? I’m assuming it is only used in nodejs.

  "browser": {
    "lib/transport/rawsocket.js": false,
    "ws": false
   ....

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
blazzycommented, Jul 14, 2016

Could a pre-built browser version be published to npm?

That would allow folks to install from npm and use whatever build system they please without having to solve issues like this all over again.

0reactions
oberstetcommented, Nov 15, 2016

Ok, I’ve managed to cut down browser version to 1/3 of original size (from 181KB to 58KB for the jgz):

(cpy2712_1) oberstet@office-corei7:~/scm/crossbario/autobahn-js$ ls -la build/
insgesamt 896
drwxrwxr-x 2 oberstet oberstet   4096 Nov 15 11:14 .
drwxrwxr-x 7 oberstet oberstet   4096 Nov 15 11:14 ..
-rw-rw-r-- 1 oberstet oberstet 573208 Nov 15 11:14 autobahn.js
-rw-rw-r-- 1 oberstet oberstet  58009 Nov 15 11:14 autobahn.min.jgz
-rw-rw-r-- 1 oberstet oberstet 198906 Nov 15 11:14 autobahn.min.js
-rw-rw-r-- 1 oberstet oberstet    168 Nov 15 11:14 CHECKSUM.MD5
-rw-rw-r-- 1 oberstet oberstet    195 Nov 15 11:14 CHECKSUM.SHA1
-rw-rw-r-- 1 oberstet oberstet    273 Nov 15 11:14 CHECKSUM.SHA256
-rw-rw-r-- 1 oberstet oberstet   1086 Nov 15 11:12 LICENSE
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to terminate a WebSocket connection?
According to the ws documentation, you need to call websocket.close() to terminate a connection.
Read more >
ws: a Node.js WebSocket library - GitHub
Passes the quite extensive Autobahn test suite: server, client. Note: This module does not work in the browser. The client in the docs...
Read more >
Building a Complete WebSocket App From Scratch ... - YouTube
Today you're gonna implement the Web Socket protocol from scratch using only Node.js and JavaScript. You'll get to know what are bitwise ...
Read more >
WebSockets and Node.js - testing WS and SockJS by ...
Building a cursor position sharing web app to demonstrate how to implement WebSockets with Node.js, and the pros and cons of WS and...
Read more >
WebSocket - Web APIs | MDN
desktop desktop Chrome Edge WebSocket Full support. Chrome4. Toggle history Full support. Edge12. Toggl... WebSocket() constructor Full support. Chrome4. Toggle history Full support. Edge12. Toggl...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found