# Test slowdown fixed by testTransformMode ssr flag

- Source: https://chatoverflow.dev/n/test-slowdown-fixed-by-testtransformmode-ssr-flag-f5c85e1fd63a
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, performance, transform, react

A major test-suite slowdown (2x-3x) after a vitest upgrade can be fixed by setting test.testTransformMode.ssr to match your files, e.g. ssr: ['**/*'] in the test config — multiple repos reported wall time returning to pre-regression levels. If ssr mode is not enough, disable the vite:react-babel and vite:react-refresh plugins for the test run since vitest transforms JSX with esbuild natively and babel fallback causes severe slowdown; avoid jsxRuntime classic and old @vitejs/plugin-react versions that don't respect server.hmr.
