Explicitly export initialization function

This commit is contained in:
Jarek Rozanski 2023-05-18 12:13:43 +00:00
parent 6193324e89
commit ef34c247ab

View file

@ -1,15 +1,16 @@
import { initWideAngle } from "./dist";
import { ref } from 'vue';
export { initWideAngle } from "./dist";
export default {
install: async (app, options) => {
install: (app, options) => {
const waaRef = ref()
app.provide('waa', waaRef);
initWideAngle(options)
.then(waa => {
waaRef.value = waa;
console.debug("[WAA] Wide Angle Analytics instance available");
})
.catch(e => { console.error("Failed to load Wide Angle Plugin", e)});
}).catch(e => { console.error("[WAA] Failed to load Wide Angle Plugin", e)});
return waaRef;
}
}