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 also been greatly reduced, from 16.0 KB
to 12.9 KB
(min+gzip).
Features
- typings: add missing types for some emitter methods (#1502) (a9e5b85)
- provide an ESM build with and without debug (16b6569)
- migrate to rollup (0661564)
Links:
- Diff: 4.2.0...4.3.0
- Server release: 4.3.0
- engine.io-client version:
~6.0.1
(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 |