Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/sixty-mangos-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/server': patch
---

fix(dev-server): adjust hmr connection log level

fix(dev-server): 调整 hmr 连接的日志级别
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ const socketUrl = createSocketUrl(__resourceQuery);
const connection = new WebSocket(socketUrl);

connection.onopen = function () {
if (typeof console !== 'undefined' && typeof console.debug === 'function') {
if (typeof console !== 'undefined' && typeof console.info === 'function') {
// Notify users that the HMR has successfully connected.
console.debug('[HMR] connected.');
console.info('[HMR] connected.');
}
};

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

Expand Down