init pinia

This commit is contained in:
Antony Budianto
2025-01-03 17:37:54 +07:00
parent b0221e1d21
commit de425bd9e5
15 changed files with 241 additions and 34 deletions
+10
View File
@@ -0,0 +1,10 @@
import { onBeforeMount } from "vue"
import { setActivePinia } from "pinia"
export function useHostPinia() {
onBeforeMount(() => {
console.log("RMT: init pinia store from host: ")
// @ts-expect-error global pinia host
setActivePinia(window.__mfeHostPinia || createPinia())
})
}