Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 021c465

Browse files
author
Je
committed
refactor: add close event listener
1 parent fc9e2ff commit 021c465

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hmr.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ socket.addEventListener('open', () => {
6868
messageQueue.splice(0, messageQueue.length)
6969
})
7070

71+
socket.addEventListener('close', () => {
72+
location.reload()
73+
})
74+
7175
socket.addEventListener('message', ({ data: rawData }: { data?: string }) => {
7276
if (rawData) {
7377
try {

0 commit comments

Comments
 (0)