This repository was archived by the owner on Sep 6, 2019. It is now read-only.
File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,10 @@ if (module.hot && typeof module.hot.dispose === 'function') {
61
61
var connection = new SockJS (
62
62
url . format ( {
63
63
protocol : window . location . protocol ,
64
- hostname : window . location . hostname ,
65
- port : window . location . port ,
64
+ hostname : process . env . HOST || window . location . hostname ,
65
+ port : process . env . PORT || window . location . port ,
66
66
// Hardcoded in WebpackDevServer
67
- pathname : '/sockjs-node' ,
67
+ pathname : '/sockjs-node'
68
68
} )
69
69
) ;
70
70
Original file line number Diff line number Diff line change @@ -85,6 +85,12 @@ function getClientEnvironment(publicUrl) {
85
85
// This should only be used as an escape hatch. Normally you would put
86
86
// images into the `src` and `import` them in code to get their paths.
87
87
PUBLIC_URL : publicUrl ,
88
+
89
+ // Useful for allowing the hot dev websocket to connect to the host
90
+ // specified in the env file, instead of window.location, which could
91
+ // be wrong if the dev server is being proxied.
92
+ HOST : process . env . HOST || '' ,
93
+ PORT : process . env . PORT || ''
88
94
}
89
95
) ;
90
96
// Stringify all values so we can feed into Webpack DefinePlugin
You can’t perform that action at this time.
0 commit comments