From 0d2bfeac02eeadb2947293f2eba433f372a06b2f Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 30 Jan 2024 22:13:42 +0100 Subject: [PATCH] fix: don't optimize react/jsx-runtime by default when running in Node (#5079) --- packages/vitest/src/node/plugins/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vitest/src/node/plugins/utils.ts b/packages/vitest/src/node/plugins/utils.ts index e8b0e92988b8..bfbdf8617a8f 100644 --- a/packages/vitest/src/node/plugins/utils.ts +++ b/packages/vitest/src/node/plugins/utils.ts @@ -34,7 +34,7 @@ export function resolveOptimizerConfig(_testOptions: DepsOptimizationOptions | u 'vue', ...(testOptions.exclude || viteOptions?.exclude || []), ] - const runtime = currentInclude.filter(n => n.endsWith('jsx-dev-runtime')) + const runtime = currentInclude.filter(n => n.endsWith('jsx-dev-runtime') || n.endsWith('jsx-runtime')) exclude.push(...runtime) const include = (testOptions.include || viteOptions?.include || []).filter((n: string) => !exclude.includes(n))