diff --git a/vitest.config.ts b/vitest.config.ts index 95a484920..1d0dd83b5 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,5 +1,6 @@ import { defineConfig } from 'vitest/config'; import react from '@vitejs/plugin-react'; +import os from 'os'; import path from 'path'; export default defineConfig({ @@ -15,6 +16,10 @@ export default defineConfig({ // get collected too. // scripts/lite/smoke/** is the Playwright smoke for the static Lite export. exclude: ['integration/**', 'examples/**', 'repos/**', '**/node_modules/**', '.next/**', 'out/**', 'scripts/lite/smoke/**', 'scripts/perf-guard/**', 'scripts/a11y-guard/**'], + // The default node_modules/.vitest-cache sits inside the tree Turbopack + // watches, so every test run made a running `next dev` rebuild and reload + // the open page about once a second. + fsModuleCachePath: path.join(os.tmpdir(), 'bulwark-vitest-cache'), }, resolve: { alias: {