From dff60e82804ea2eb17aeff6752c1fa53b5f910b8 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Mon, 21 Aug 2023 20:50:43 +0200 Subject: [PATCH] fix(vite-node): inline HMR types (#3993) --- packages/vite-node/rollup.config.js | 1 - packages/vite-node/src/hmr/emitter.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/vite-node/rollup.config.js b/packages/vite-node/rollup.config.js index 258770c42e10..ce97283948b8 100644 --- a/packages/vite-node/rollup.config.js +++ b/packages/vite-node/rollup.config.js @@ -27,7 +27,6 @@ const external = [ 'pathe', 'birpc', 'vite', - 'vite/types/hot', 'node:url', 'node:events', 'node:vm', diff --git a/packages/vite-node/src/hmr/emitter.ts b/packages/vite-node/src/hmr/emitter.ts index 3a814d29885e..687d293c5e5f 100644 --- a/packages/vite-node/src/hmr/emitter.ts +++ b/packages/vite-node/src/hmr/emitter.ts @@ -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) }