diff --git a/packages/vite/rollup.config.ts b/packages/vite/rollup.config.ts index 1cf3015f15d52f..5727cb537a046c 100644 --- a/packages/vite/rollup.config.ts +++ b/packages/vite/rollup.config.ts @@ -194,7 +194,7 @@ const moduleRunnerConfig = defineConfig({ ], plugins: [ ...createSharedNodePlugins({ esbuildOptions: { minifySyntax: true } }), - bundleSizeLimit(53), + bundleSizeLimit(54), ], }) diff --git a/packages/vite/src/shared/hmr.ts b/packages/vite/src/shared/hmr.ts index 76c4ece4d44919..342e0894bef971 100644 --- a/packages/vite/src/shared/hmr.ts +++ b/packages/vite/src/shared/hmr.ts @@ -190,7 +190,9 @@ export class HMRClient { } public send(payload: HotPayload): void { - this.transport.send(payload) + this.transport.send(payload).catch((err) => { + this.logger.error(err) + }) } public clear(): void { diff --git a/packages/vite/src/shared/moduleRunnerTransport.ts b/packages/vite/src/shared/moduleRunnerTransport.ts index f10ef69ba193bf..8fad9b0d2f5fe0 100644 --- a/packages/vite/src/shared/moduleRunnerTransport.ts +++ b/packages/vite/src/shared/moduleRunnerTransport.ts @@ -179,7 +179,7 @@ const createInvokeableTransport = ( export interface NormalizedModuleRunnerTransport { connect?(onMessage?: (data: HotPayload) => void): Promise | void disconnect?(): Promise | void - send(data: HotPayload): void + send(data: HotPayload): Promise invoke( name: T, data: Parameters,