diff --git a/README.md b/README.md index 08048d8..a3d743e 100644 --- a/README.md +++ b/README.md @@ -260,7 +260,15 @@ export default { } ``` +## Vite +If you are using Vite, you should add the following to your defineConfig options in vite.config.js: + +```js +optimizeDeps: { + exclude: ['vue-demi'] +} +``` ## Nuxt diff --git a/src/index.ts b/src/index.ts index 08f26ec..e6e503e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,7 +24,7 @@ export function useSound( onMounted(async () => { const howler = await import('howler') - HowlConstructor.value = howler.Howl + HowlConstructor.value = howler.default.Howl sound.value = new HowlConstructor.value({ src: unref(url) as string,