From 784ceefd4f45a2f9b659c6ba29764278195fa63f Mon Sep 17 00:00:00 2001 From: Jungzl <13jungzl@gmail.com> Date: Thu, 13 Aug 2026 15:32:43 +0800 Subject: [PATCH] fix: update HMR condition to exclude test mode --- src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index ead2980..eb78800 100644 --- a/src/index.ts +++ b/src/index.ts @@ -329,7 +329,11 @@ export default function solidPlugin(options: Partial = {}): Plugin { }, configResolved(config) { - needHmr = config.command === 'serve' && config.mode !== 'production' && options.hot !== false; + needHmr = + !isTestMode && + config.command === 'serve' && + config.mode !== 'production' && + options.hot !== false; }, resolveId(id) {