A minimal WebSocket client library for browser and Node.js environments, version 1.0.32. Provides simple connection management, message sending/receiving, and automatic reconnection. Lightweight alternative to socket.io with no dependencies. Ships TypeScript definitions. Low release cadence with infrequent updates.
npm install vweb-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a WebSocket client, connects to an echo server, sends a message, and logs responses.
Install optional dependency: npm install ws
Update call to `client.connect(url, options)` -> `client.connect(options)`
Replace `client.close()` with `client.disconnect()`
Set `{ reconnect: false }` in constructor options if not needed.Set `moduleResolution` to 'node16' or 'bundler' in tsconfig.json.
npm install ws
Switch to `import { WebSocketClient } from 'vweb-websocket'`npm install ws
No dependency data recorded yet.