From 15d29983d487b4153665c6372a816c9b932b4f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Charles?= Date: Tue, 17 Dec 2024 11:48:57 +0100 Subject: [PATCH] fix: disable vike-node dev server in test mode --- packages/vike-node/src/plugin/plugins/devServerPlugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vike-node/src/plugin/plugins/devServerPlugin.ts b/packages/vike-node/src/plugin/plugins/devServerPlugin.ts index 9317e67..04115da 100644 --- a/packages/vike-node/src/plugin/plugins/devServerPlugin.ts +++ b/packages/vike-node/src/plugin/plugins/devServerPlugin.ts @@ -20,7 +20,9 @@ export function devServerPlugin(): Plugin { let setupHMRProxyDone = false return { name: 'vite-node:devserver', - apply: 'serve', + apply(_config, { command, mode }) { + return command === 'serve' && mode !== 'test' + }, enforce: 'pre', config: async () => { await setupProcessRestarter()