Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
17ab11e2
Commit
17ab11e2
authored
8 years ago
by
Dan Abramov
Browse files
Options
Download
Email Patches
Plain Diff
Add an unobtrusive log when server disconnects
parent
e872907b
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-dev-utils/webpackHotDevClient.js
+9
-3
packages/react-dev-utils/webpackHotDevClient.js
with
9 additions
and
3 deletions
+9
-3
packages/react-dev-utils/webpackHotDevClient.js
+
9
-
3
View file @
17ab11e2
...
@@ -130,9 +130,15 @@ var connection = new SockJS(url.format({
...
@@ -130,9 +130,15 @@ var connection = new SockJS(url.format({
// Hardcoded in WebpackDevServer
// Hardcoded in WebpackDevServer
pathname
:
'
/sockjs-node
'
pathname
:
'
/sockjs-node
'
}));
}));
// Note: unlike WebpackDevServer's built-in client,
// we don't handle disconnect. If connection fails,
// Unlike WebpackDevServer client, we won't try to reconnect
// just leave it instead of spamming the console.
// to avoid spamming the console. Disconnect usually happens
// when developer stops the server.
connection
.
onclose
=
function
()
{
console
.
info
(
'
The development server has disconnected.
\n
Refresh the page if necessary.
'
);
};
// Remember some state related to hot module replacement.
// Remember some state related to hot module replacement.
var
isFirstCompilation
=
true
;
var
isFirstCompilation
=
true
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets