Skip to content

Commit 31ae87f

Browse files
authored
Fix HowlConstructor.value is not a constructor error (#29)
1 parent 3c4978b commit 31ae87f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,15 @@ export default {
260260
}
261261
</script>
262262
```
263+
## Vite
263264

265+
If you are using Vite, you should add the following to your defineConfig options in vite.config.js:
266+
267+
```js
268+
optimizeDeps: {
269+
exclude: ['vue-demi']
270+
}
271+
```
264272

265273
## Nuxt
266274

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function useSound(
2424
onMounted(async () => {
2525
const howler = await import('howler')
2626

27-
HowlConstructor.value = howler.Howl
27+
HowlConstructor.value = howler.default.Howl
2828

2929
sound.value = new HowlConstructor.value({
3030
src: unref(url) as string,

0 commit comments

Comments
 (0)