转到主要内容

Socket.IO 4.3.0

· Une minute de lecture
Damien Arrachequesne

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).

Size of the bundles:

minmin+gzip
socket.io.min.js39.9 KB (-24.6 KB ⬇️)12.9 KB (-3.1 KB ⬇️)
socket.io.msgpack.min.js45.1 KB (-25.6 KB ⬇️)14 KB (-2.6 KB ⬇️)
socket.io.esm.min.js32.7 KB11.1 KB

That's all for this release, thanks for reading!