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