antfu-collective / vite-ssg

Static site generation for Vue 3 on Vite
MIT License
1.27k stars 129 forks source link

Support stripe-away slot of `ClientOnly` on SSG #378

Open antfu opened 8 months ago

antfu commented 8 months ago

Clear and concise description of the problem

It's common to encounter errors when using client-side only package. Even with <ClientOnly>, the users need to handle that carefully as the import can still be synchronized.

Suggested solution

We do a transform to Vue file that removes the content of <ClientOnly>. Similiar to https://github.com/nuxt/framework/pull/8713

Alternative

No response

Additional context

No response

Validations