Skip to content

Commit 31d9038

Browse files
committed
wip: fix hmr code
1 parent 365fabb commit 31d9038

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/vite/src/client/client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,8 @@ if (isFullBundleMode && typeof DevRuntime !== 'undefined') {
644644
transport.send({
645645
type: 'custom',
646646
event: 'vite:module-loaded',
647-
data: { modules: message.modules },
647+
// clone array as the runtime reuses the array instance
648+
data: { modules: message.modules.slice() },
648649
})
649650
break
650651
}

0 commit comments

Comments
 (0)