Hello everyone!
We have just published a new minor version of Socket.IO: 4.3.0
An ESM bundle is now provided:
<script type="module">
import { io } from "https://cdn.socket.io/4.3.0/socket.io.esm.min.js";
const socket = io();
socket.emit("hello", "world");
</script>
The bundle size has been greatly reduced, thanks to:
- the migration to rollup
- the cleanup of some unused code
- the removal of debug calls from the bundle (explanation here)
And finally, the Socket.IO client is now compatible with Vite (#1492).
Links
- Server: Release notes / Diff
- Client: Release notes / Diff
ws
version:~8.2.3
(diff)
Size of the bundles:
min | min+gzip | |
---|---|---|
socket.io.min.js | 39.9 KB (-24.6 KB ⬇️) | 12.9 KB (-3.1 KB ⬇️) |
socket.io.msgpack.min.js | 45.1 KB (-25.6 KB ⬇️) | 14 KB (-2.6 KB ⬇️) |
socket.io.esm.min.js | 32.7 KB | 11.1 KB |
That's all for this release, thanks for reading!