mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-26 01:34:07 +00:00
- Convert static imports to defineAsyncComponent - Breaks ~100 circular dependency cycles through sidebar tabs - Sidebar tabs load lazily on first access Amp-Thread-ID: https://ampcode.com/threads/T-019bfe73-6a29-7638-8160-8de515af8707 Co-authored-by: Amp <amp@ampcode.com>
20 lines
549 B
TypeScript
20 lines
549 B
TypeScript
import { defineAsyncComponent } from 'vue'
|
|
|
|
import type { SidebarTabExtension } from '@/types/extensionTypes'
|
|
|
|
const NodeLibrarySidebarTab = defineAsyncComponent(
|
|
() => import('@/components/sidebar/tabs/NodeLibrarySidebarTab.vue')
|
|
)
|
|
|
|
export const useNodeLibrarySidebarTab = (): SidebarTabExtension => {
|
|
return {
|
|
id: 'node-library',
|
|
icon: 'icon-[comfy--node]',
|
|
title: 'sideToolbar.nodeLibrary',
|
|
tooltip: 'sideToolbar.nodeLibrary',
|
|
label: 'sideToolbar.labels.nodes',
|
|
component: NodeLibrarySidebarTab,
|
|
type: 'vue'
|
|
}
|
|
}
|