chore(frontend-admin): 🔧 Update Vite build configuration
This commit is contained in:
parent
daf3720316
commit
da7f725f6a
1 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue