You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"SockJS only supports client mode and does not support custom hostname and port options. Please consider using 'ws' if you need to customize these options.",
690
-
);
691
-
}
692
-
693
682
// We are proxying dev server and need to specify custom `hostname`
694
683
if(typeofwebSocketURL.hostname!=="undefined"){
695
684
hostname=webSocketURL.hostname;
696
685
}
697
686
// Web socket server works on custom `hostname`, only for `ws` because `sock-js` is not support custom `hostname`
// could be 'sockjs', 'ws', or a path that should be required
1593
-
if(clientTransport==="sockjs"){
1594
-
clientImplementation=require.resolve(
1595
-
"../client/clients/SockJSClient",
1596
-
);
1597
-
}elseif(clientTransport==="ws"){
1579
+
// could be 'ws', or a path that should be required
1580
+
if(clientTransport==="ws"){
1598
1581
clientImplementation=require.resolve(
1599
1582
"../client/clients/WebSocketClient",
1600
1583
);
@@ -1616,7 +1599,7 @@ class Server {
1616
1599
!isKnownWebSocketServerImplementation
1617
1600
? "When you use custom web socket implementation you must explicitly specify client.webSocketTransport. "
1618
1601
: ""
1619
-
}client.webSocketTransport must be a string denoting a default implementation (e.g. 'sockjs', 'ws') or a full path to a JS file via require.resolve(...) which exports a class `,
1602
+
}client.webSocketTransport must be a string denoting a default implementation (e.g. 'ws') or a full path to a JS file via require.resolve(...) which exports a class `,
1620
1603
);
1621
1604
}
1622
1605
@@ -1639,14 +1622,8 @@ class Server {
1639
1622
)
1640
1623
){
1641
1624
case"string":
1642
-
// Could be 'sockjs', in the future 'ws', or a path that should be required
1625
+
// Could be 'ws', or a path that should be required
1643
1626
if(
1644
-
/** @type {WebSocketServerConfiguration} */(
1645
-
this.options.webSocketServer
1646
-
).type==="sockjs"
1647
-
){
1648
-
implementation=require("./servers/SockJSServer");
1649
-
}elseif(
1650
1627
/** @type {WebSocketServerConfiguration} */(
1651
1628
this.options.webSocketServer
1652
1629
).type==="ws"
@@ -1674,7 +1651,7 @@ class Server {
1674
1651
1675
1652
if(!implementationFound){
1676
1653
thrownewError(
1677
-
"webSocketServer (webSocketServer.type) must be a string denoting a default implementation (e.g. 'ws', 'sockjs'), a full path to "+
1654
+
"webSocketServer (webSocketServer.type) must be a string denoting a default implementation (e.g. 'ws'), a full path to "+
1678
1655
"a JS file which exports a class extending BaseServer (webpack-dev-server/lib/servers/BaseServer.js) "+
1679
1656
"via require.resolve(...), or the class itself which extends BaseServer",
0 commit comments