feat: expose Vue globally for external extension widgets

This commit is contained in:
Johnpaul
2025-12-24 02:16:23 +01:00
parent b4a6b8b5ff
commit be99596fd3
2 changed files with 23 additions and 0 deletions

View File

@@ -12,6 +12,10 @@ import { createApp } from 'vue'
import { VueFire, VueFireAuth } from 'vuefire'
import { getFirebaseConfig } from '@/config/firebase'
import { exposeVueApi } from '@/utils/vueExtensionApi'
// Expose Vue utilities for external extensions before they load
exposeVueApi()
import '@/lib/litegraph/public/css/litegraph.css'
import router from '@/router'

View File

@@ -0,0 +1,19 @@
/**
* Exposes Vue for external extensions to create Vue components.
*
* Usage in extensions:
* ```js
* const { h, defineComponent, ref, computed } = window.Vue
* ```
*/
import * as Vue from 'vue'
declare global {
interface Window {
Vue: typeof Vue
}
}
export function exposeVueApi(): void {
window.Vue = Vue
}