sound
sound copied to clipboard
Not working with Vue3 & Vite3
I only get the error in the image
same problem
same problem
same problem
same problem
same problem
Hey @ozgurozalp & @tunghsingw 🙂
I'm very sorry I took so long to answer and fix this issue!
Could you let me know if v2 fixed it for you? I successfully run it with latest Vite and Nuxt 3!
When using a fresh Vite / Vue 3 app (created with Vite CLI). I get the error:
HowlConstructor.value is not a constructor
I forked and tried editing line 27 on index.ts from HowlConstructor.value = howler.Howl
to HowlConstructor.value = howler.default.Howl
, but then I get the same warning mentioned above
After some more tinkering, importing onMounted from 'vue' instead of 'vue-demi' fixed the problem. Is this potentially a Vue bug? I thought they're meant to interact seamlessly 🤔
On index.ts line 2:
import { onMounted, ref, unref, watch } from 'vue'
Edit: have made a PR with some more info https://github.com/vueuse/sound/pull/29