diff --git a/features/messaging/frontend-public/vite.config.ts b/features/messaging/frontend-public/vite.config.ts index 50779d57c..51c435dd8 100644 --- a/features/messaging/frontend-public/vite.config.ts +++ b/features/messaging/frontend-public/vite.config.ts @@ -61,15 +61,14 @@ export default defineConfig({ inline: ['@lilith/text-processing-content-flagging'], }, }, - poolOptions: { - forks: { - // Limit to 1 concurrent fork. The deps.inline Vite processing of the - // content-flagging package consumes significant heap per fork. Running - // multiple forks simultaneously exhausts system memory. - maxForks: 1, - minForks: 1, - }, - }, + // Vitest 4 top-level pool options (replaces deprecated test.poolOptions). + // Limit to 1 concurrent worker — deps.inline Vite processing of the + // content-flagging package consumes significant heap per worker. + maxWorkers: 1, + // Increase heap for forks that inline the content-flagging package. + // The barrel re-exports UI components pulling in styled-components + + // React transitive deps, which bloats the Vite transform cache. + execArgv: ['--max-old-space-size=4096'], }, build: { outDir: 'dist',