Skip to content

Commit

Permalink
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
@@ -272,7 +272,9 @@ export class Server extends EventEmitter {

const escapedPath = this._path.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
this.clientPathRegex = new RegExp(
"^" + escapedPath + "/socket\\.io(\\.min)?\\.js(\\.map)?$"
"^" +
escapedPath +
"/socket\\.io(\\.min|\\.msgpack\\.min)?\\.js(\\.map)?$"
);
return this;
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
],
"files": [
"dist/",
"client-dist/",
"wrapper.mjs"
],
"type": "commonjs",
10 changes: 10 additions & 0 deletions test/socket.io.ts
Original file line number Diff line number Diff line change
@@ -92,6 +92,16 @@ describe("socket.io", () => {
});
});

it(
"should serve bundle with msgpack parser",
testSource("socket.io.msgpack.min.js")
);

it(
"should serve source map for bundle with msgpack parser",
testSourceMap("socket.io.msgpack.min.js.map")
);

it("should handle 304", done => {
const srv = createServer();
new Server(srv);

0 comments on commit aa7574f

Please sign in to comment.