Skip to content

Commit 8fa8566

Browse files
authored
fix(dev-server): adjust hmr connection log level (#3755)
1 parent 441a579 commit 8fa8566

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.changeset/sixty-mangos-love.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@modern-js/server': patch
3+
---
4+
5+
fix(dev-server): adjust hmr connection log level
6+
7+
fix(dev-server): 调整 hmr 连接的日志级别

packages/server/server/src/dev-tools/dev-middleware/hmr-client/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const socketUrl = createSocketUrl(__resourceQuery);
2828
const connection = new WebSocket(socketUrl);
2929

3030
connection.onopen = function () {
31-
if (typeof console !== 'undefined' && typeof console.debug === 'function') {
31+
if (typeof console !== 'undefined' && typeof console.info === 'function') {
3232
// Notify users that the HMR has successfully connected.
33-
console.debug('[HMR] connected.');
33+
console.info('[HMR] connected.');
3434
}
3535
};
3636

@@ -39,7 +39,7 @@ connection.onopen = function () {
3939
// when developer stops the server.
4040
connection.onclose = function () {
4141
if (typeof console !== 'undefined' && typeof console.info === 'function') {
42-
console.debug('[HMR] disconnected. Refresh the page if necessary.');
42+
console.info('[HMR] disconnected. Refresh the page if necessary.');
4343
}
4444
};
4545

0 commit comments

Comments
 (0)