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()