Skip to content

Commit

Permalink
Fix HowlConstructor.value is not a constructor error (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
P-James authored Feb 2, 2023
1 parent 3c4978b commit 31ae87f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,15 @@ export default {
}
</script>
```
## 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

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 31ae87f

Please sign in to comment.