Skip to content

Commit

Permalink
fix(vite-node): inline HMR types (vitest-dev#3993)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored and LorenzoBloedow committed Dec 19, 2023
1 parent f3e10ac commit 7cfdac7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion packages/vite-node/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const external = [
'pathe',
'birpc',
'vite',
'vite/types/hot',
'node:url',
'node:events',
'node:vm',
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-node/src/hmr/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function viteNodeHmrPlugin(): Plugin {
configureServer(server) {
const _send = server.ws.send
server.emitter = emitter
server.ws.send = function (payload: HMRPayload) {
server.ws.send = function (payload: any) {
_send(payload)
emitter.emit('message', payload)
}
Expand Down

0 comments on commit 7cfdac7

Please sign in to comment.