vue-simple-portal icon indicating copy to clipboard operation
vue-simple-portal copied to clipboard

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

Open afontcu opened this issue 4 years ago • 3 comments
trafficstars

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!

afontcu avatar Dec 18 '20 15:12 afontcu

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

Can you create a small repro?

LinusBorg avatar Dec 31 '20 10:12 LinusBorg

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

afontcu avatar Dec 31 '20 11:12 afontcu

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

atrunelle avatar Jan 12 '21 11:01 atrunelle