Closed alihamza1214 closed 2 years ago
I don't think there has a difference about this between these two versions.
I think it is caused by SSR which this library doesn't support.
If you use Nuxt, you can easily exclude this component following this: https://nuxtjs.org/docs/features/nuxt-components#the-client-only-component
Another way it might work is import the source code like:
import VueZoomer from 'vue-zoomer/src'
But I don't know if these two methods can solve your problem.
window is not defined
at node_modules/vue-zoomer/dist/vue-zoomer.min.js:1:275 at node_modules/vue-zoomer/dist/vue-zoomer.min.js:1:146 at Object. (node_modules/vue-zoomer/dist/vue-zoomer.min.js:1:224)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at node_modules/vue-server-renderer/build.prod.js:1:77944