diff --git a/code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts b/code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts index c7218e328fc6..175ea0a2cfd9 100644 --- a/code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts +++ b/code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts @@ -271,5 +271,11 @@ async function getTsConfigReferences(tsConfigPath: string) { */ function removeNestedSchemas(schema: PropertyMetaSchema) { if (typeof schema !== 'object') return; + if (schema.kind === 'enum') { + // for enum types, we do not want to remove the schemas because otherwise the controls will be missing + // instead we remove the nested schemas for the enum entries to prevent out of memory errors for types like "HTMLElement | MouseEvent" + schema.schema?.forEach((enumSchema) => removeNestedSchemas(enumSchema)); + return; + } delete schema.schema; }