From c51c67aa657ed4748ec1b972c4d741c68984bb35 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Wed, 31 Jul 2024 17:14:10 +0200 Subject: [PATCH] fix(vite-node): disable watcher if hmr is disabled (#6251) --- packages/vite-node/src/cli.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vite-node/src/cli.ts b/packages/vite-node/src/cli.ts index cbb8c82c890a..f0ae153bee02 100644 --- a/packages/vite-node/src/cli.ts +++ b/packages/vite-node/src/cli.ts @@ -90,6 +90,7 @@ async function run(files: string[], options: CliOptions = {}) { mode: options.mode, server: { hmr: !!options.watch, + watch: options.watch ? undefined : null, }, plugins: [options.watch && viteNodeHmrPlugin()], })