Skip to content

Commit 0d2bfea

Browse files
authoredJan 30, 2024
fix: don't optimize react/jsx-runtime by default when running in Node (#5079)
1 parent 1045b98 commit 0d2bfea

File tree

1 file changed

+1
-1
lines changed
  • packages/vitest/src/node/plugins

1 file changed

+1
-1
lines changed
 

‎packages/vitest/src/node/plugins/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function resolveOptimizerConfig(_testOptions: DepsOptimizationOptions | u
3434
'vue',
3535
...(testOptions.exclude || viteOptions?.exclude || []),
3636
]
37-
const runtime = currentInclude.filter(n => n.endsWith('jsx-dev-runtime'))
37+
const runtime = currentInclude.filter(n => n.endsWith('jsx-dev-runtime') || n.endsWith('jsx-runtime'))
3838
exclude.push(...runtime)
3939

4040
const include = (testOptions.include || viteOptions?.include || []).filter((n: string) => !exclude.includes(n))

0 commit comments

Comments
 (0)
Please sign in to comment.