webpackHotDev now uses wss when https is used (#8079)

This commit is contained in:
Mike Caulley
2019-12-04 22:35:07 -08:00
committed by Ian Schmitz
parent 9a817dd0d7
commit 9f4cb4f0c0

View File

@@ -59,7 +59,7 @@ if (module.hot && typeof module.hot.dispose === 'function') {
// Connect to WebpackDevServer via a socket.
var connection = new WebSocket(
url.format({
protocol: 'ws',
protocol: window.location.protocol === 'https:' ? 'wss' : 'ws',
hostname: window.location.hostname,
port: window.location.port,
// Hardcoded in WebpackDevServer