chore(frontend-admin): 🔧 Update Vite build configuration

This commit is contained in:
Lilith 2026-01-20 01:31:01 -08:00
parent daf3720316
commit da7f725f6a

View file

@ -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;
}