Open annamithairil opened 1 month ago
Hello @annamithairil, yes the component is rendered only on the client side hence the need to wrap it with the <client-only>
tag
Also want to note that if you are trying to add it as a Nuxt plugin, you'll want to use the file name *.client.js
// vue-compare-image.client.js
import VueCompareImage from 'vue3-compare-image'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(VueCompareImage)
})
can not work in SSR mode,when i use it and refresh the page, the website wents to /, when wrappered by
it became normal