LinusBorg / vue-simple-portal

A simpler Portal implementation focussed on moving slot content to the end of the body element
Other
223 stars 28 forks source link

Needed to import from `dist/index.umd` to avoid having multiple Vue instances #53

Open afontcu opened 3 years ago

afontcu commented 3 years ago

Hi mate! I was running into some issues with vue-simple-portal in Nuxt because it was importing another Vue instance so I was getting the usual “$attrs is readonly” “$listeners is readonly” errors.

I got it fixed by changing the import statement to

- import { Portal } from '@linusborg/vue-simple-portal'
+ import { Portal } from '@linusborg/vue-simple-portal/dist/index.umd'

but I wanted to double check if this is intended behavior or if I'm actually doing something wrong here 😇

Thanks!

LinusBorg commented 3 years ago

Hm. Seems weird. Not sure where to start, would have to be related to the build config...

Can you create a small repro?

afontcu commented 3 years ago

Sure! I'll set up a minimal repro and see if the issue is still there – I wanted to make sure it wasn't an expected behavior

atrunelle commented 3 years ago

We were having the same issue in Nuxt using 0.1.4, but it seems 0.1.5 fixed the problem