fuxingloh / vue-masonry-wall

A pure vue responsive masonry layout without direct dom manipulation and ssr support.
https://nuxt-app.fuxing.dev/vue-masonry-wall
MIT License
211 stars 31 forks source link

Build Error - Document is not defined #33

Open conjack27 opened 3 years ago

conjack27 commented 3 years ago

image

davestewart commented 2 years ago

Just installed and built for the first time in VuePress and got the same.

I was using the ssr property which I removed and no difference.

Wrapping the component in VuePress' <ClientOnly> allowed it to work properly.

I'm not 100% sure at what stage of the render it was trying to access document but I think it would be worth looking into seeing as the lib as advertised as "SSR-compatible".