mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Pros: - events with binary content are sent as 1 WebSocket frame (instead of 2 with the default parser) - payloads with lots of numbers should be smaller Cons: - no IE9 support (https://caniuse.com/mdn-javascript_builtins_arraybuffer) - a slightly bigger bundle size (61.1 vs 59.9 KB) Source: https://github.com/darrachequesne/socket.io-msgpack-parser
18 lines
368 B
JavaScript
18 lines
368 B
JavaScript
const { NormalModuleReplacementPlugin } = require("webpack");
|
|
const config = require("./prod.config");
|
|
|
|
module.exports = {
|
|
...config,
|
|
output: {
|
|
...config.output,
|
|
filename: "socket.io.msgpack.min.js",
|
|
},
|
|
plugins: [
|
|
...config.plugins,
|
|
new NormalModuleReplacementPlugin(
|
|
/^socket.io-parser$/,
|
|
"socket.io-msgpack-parser"
|
|
),
|
|
],
|
|
};
|