From da7f725f6ae71be97df749bf085f0ceb9a97aca0 Mon Sep 17 00:00:00 2001 From: Lilith Date: Tue, 20 Jan 2026 01:31:01 -0800 Subject: [PATCH] =?UTF-8?q?chore(frontend-admin):=20=F0=9F=94=A7=20Update?= =?UTF-8?q?=20Vite=20build=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/platform-admin/frontend-admin/vite.config.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/features/platform-admin/frontend-admin/vite.config.ts b/features/platform-admin/frontend-admin/vite.config.ts index 43757479b..3622ef60d 100755 --- a/features/platform-admin/frontend-admin/vite.config.ts +++ b/features/platform-admin/frontend-admin/vite.config.ts @@ -35,12 +35,19 @@ const attributesUrl = process.env.VITE_ATTRIBUTES_URL || getServiceUrl('attribut const imageGeneratorUrl = process.env.VITE_IMAGE_GENERATOR_URL || getServiceUrl('image-generator', 'api'); const semanticUrl = process.env.VITE_SEMANTIC_URL || getServiceUrl('truth-validation', 'api'); -// Rollup plugin to ignore .d.ts imports (fixes broken styled.d.ts in ui-* packages) +// Plugin to handle .d.ts imports (fixes broken styled.d.ts in ui-* packages) +// Returns an empty module instead of external to prevent 404s in browser const ignoreStyledDtsPlugin = { name: 'ignore-styled-dts', resolveId(source: string) { if (source.endsWith('.d.ts') || source === './styled.d.ts') { - return { id: source, external: true }; + return '\0virtual:empty-dts'; + } + return null; + }, + load(id: string) { + if (id === '\0virtual:empty-dts') { + return '// Empty module for .d.ts import'; } return null; }