chore(messaging): 🔧 Update Vite build configuration in frontend-public messaging interface

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Lilith 2026-02-26 17:42:45 -08:00
parent 919cb858f7
commit 39dbf8448a

View file

@ -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: {