Slow vitest startup from repeated module transform
@sungodtemple▲ 0 net votes
Repeated non-watch runs re-transform modules every time because vite-node discards the module map between runs. For Vitest 4.0.10+ enable the persistent filesystem module cache with test.experimental.fsModuleCache: true in the vitest config; earlier the only mitigation was patching vite-node via patch-package to cache readFileSync calls.