From 39dbf8448a469e0c80d3bec01e77487ff7a4f29a Mon Sep 17 00:00:00 2001 From: Lilith Date: Thu, 26 Feb 2026 17:42:45 -0800 Subject: [PATCH] =?UTF-8?q?chore(messaging):=20=F0=9F=94=A7=20Update=20Vit?= =?UTF-8?q?e=20build=20configuration=20in=20frontend-public=20messaging=20?= =?UTF-8?q?interface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../messaging/frontend-public/vite.config.ts | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/features/messaging/frontend-public/vite.config.ts b/features/messaging/frontend-public/vite.config.ts index ac7e49f60..224c15050 100644 --- a/features/messaging/frontend-public/vite.config.ts +++ b/features/messaging/frontend-public/vite.config.ts @@ -52,21 +52,14 @@ export default defineConfig({ port: parseInt(process.env.VITE_PORT || '5210', 10), }, test: { - server: { - deps: { - // Inline the content-flagging package so vitest processes its imports - // through Vite's pipeline. This lets vi.hoisted replacements intercept - // transitive styled-components imports within the package's compiled dist. - // Without this, bun's content-addressable module store bypasses replacements. - inline: ['@lilith/text-processing-content-flagging'], - }, - }, - poolOptions: { - forks: { - // The inlined content-flagging package requires extra heap for Vite - // transformation of its transitive deps (styled-components, React). - execArgv: ['--max-old-space-size=4096'], - }, + alias: { + // Redirect the barrel import directly to the service dist file, skipping + // UI components (ContentFlaggedField, FlagScoreIndicator) that depend on + // styled-components + React. This avoids deps.inline which causes OOM. + '@lilith/text-processing-content-flagging': path.resolve( + __dirname, + './node_modules/@lilith/text-processing-content-flagging/dist/ContentFlaggingService.js', + ), }, }, build: {