KABBOUCHI / vue-tippy

VueJS Tooltip powered by Tippy.js
https://vue-tippy.netlify.app
MIT License
726 stars 87 forks source link

SVGElement is not defined when in Node Env using server side rendering #244

Closed Chrissdroid closed 2 years ago

Chrissdroid commented 2 years ago

When using SSR SVGElement is not declared on the env because it's running on a NodeJS environnement DocumentFragment may be affected too.

It's affected by this line in src/components/Tippy.ts: https://github.com/KABBOUCHI/vue-tippy/blob/c2b7c1012ae55b9bd1db9077b9ba67b0e89266e0/src/components/Tippy.ts#L37

Can it be avoided to be able to declare vue-tippy instance with SSR and hydrate after on client side ?

KABBOUCHI commented 2 years ago

@Chrissdroid plz can u try v6.0.0-alpha.56?

Chrissdroid commented 2 years ago

It didnt work sadly, still have the error at the same line on v6.0.0-alpha.56

Chrissdroid commented 2 years ago

i'm using vite@v2.8.6 if you need to test it on your side

KABBOUCHI commented 2 years ago

its working for me https://stackblitz.com/edit/vitejs-vite-uxpbyn?file=src%2FApp.vue&terminal=dev

plz can u share ur code? vite.new/vue

Chrissdroid commented 2 years ago

take a look at this repro https://stackblitz.com/edit/github-3v6wxq?file=src%2Fcomponents%2FCounter.vue&on=stackblitz using astro@next

KABBOUCHI commented 2 years ago

I temporarily removed the type, it should work now, I'll investigate more later.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.