If you're blocked by this, https://www.npmjs.com/package/patch-package works well until a release is cut.
This is the patch I am using that patch-package created in patches/react-dev-utils+10.0.0.patch
diff --git a/node_modules/react-dev-utils/webpackHotDevClient.js b/node_modules/react-dev-utils/webpackHotDevClient.js
index fb515f0..b669fd9 100644
--- a/node_modules/react-dev-utils/webpackHotDevClient.js
+++ b/node_modules/react-dev-utils/webpackHotDevClient.js
@@ -59,11 +59,12 @@ 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
pathname: '/sockjs-node',
+ slashes: true,
})
);
This is the patch I am using that patch-package created in
patches/react-dev-utils+10.0.0.patchdiff --git a/node_modules/react-dev-utils/webpackHotDevClient.js b/node_modules/react-dev-utils/webpackHotDevClient.js index fb515f0..b669fd9 100644 --- a/node_modules/react-dev-utils/webpackHotDevClient.js +++ b/node_modules/react-dev-utils/webpackHotDevClient.js @@ -59,11 +59,12 @@ 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 pathname: '/sockjs-node', + slashes: true, }) );
That鈥檚 a cool solution. TIL. Thanks for the tip. I still prefer v3.3.1 to be released with this change, but it鈥檚 nice to know this is an option.
Please. 馃檹 This has been blocking us from upgrading to 3.3 for the last month, and I'd love to be able to take advantage of those new capabilities. (patch-package looks very cool, thanks for the pointer, but we're not willing to use that for prod code.)
Happy to use patch-package, however, is there any indication of when it might get cut just so I can check back and remove the patch? Will it wait for 3.4.0 or will a 3.3.1 version eventually be cut?
FYI, there's a conversation in #8237 about the new release. The milestone is here for those keeping score at home. 馃榿
Releasing in the next couple hours.
Most helpful comment
Please. 馃檹 This has been blocking us from upgrading to 3.3 for the last month, and I'd love to be able to take advantage of those new capabilities. (
patch-packagelooks very cool, thanks for the pointer, but we're not willing to use that for prod code.)