Explicitly export initialization function
This commit is contained in:
parent
6193324e89
commit
ef34c247ab
1 changed files with 4 additions and 3 deletions
7
index.js
7
index.js
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue