vue-masonry icon indicating copy to clipboard operation
vue-masonry copied to clipboard

vue-masonry not work with vue-server-renderer

Open daitkhealex opened this issue 4 years ago • 3 comments

I would like to use this package together with vue-server-renderer. Compilation is error-free, but the following error occurs at startup. ReferenceError: window is not defined at Object. (/Users/alexanderdaitkhe/Downloads/www/mediahubvue/node_modules/vue-masonry/dist/vue-masonry-plugin-window.js:6:1) at Module._compile (internal / modules / cjs / loader.js: 956: 30) at Object.Module._extensions..js (internal / modules / cjs / loader.js: 973: 10) at Module.load (internal / modules / cjs / loader.js: 812: 32) at Function.Module._load (internal / modules / cjs / loader.js: 724: 14) at Module.require (internal / modules / cjs / loader.js: 849: 19) at require (internal / modules / cjs / helpers.js: 74: 18) at r (/Users/alexanderdaitkhe/Downloads/www/mediahubvue/node_modules/vue-server-renderer/build.dev.js:9300:16) at Object.vue-masonry / dist / vue-masonry-plugin-window (webpack: / external "vue-masonry / dist / vue-masonry-plugin-window": 1: 0) at webpack_require (webpack / bootstrap: 25: 0) at Module ../ src / main.js (app.js: 1051: 101) at webpack_require (webpack / bootstrap: 25: 0) at Module ../ src / entry-server.js (app.js: 962: 63) at webpack_require (webpack / bootstrap: 25: 0) at Object.0 (app.js: 5352: 18) at webpack_require (webpack / bootstrap: 25: 0)

daitkhealex avatar Nov 19 '19 04:11 daitkhealex

there are 2 files generated https://github.com/shershen08/vue-masonry/tree/master/dist especially for easy of use in all contexts. is there a way to use the UMD one ?

shershen08 avatar Nov 19 '19 11:11 shershen08

Vue SSR not work!

import {VueMasonryPlugin} from 'vue-masonry';
Vue.use(VueMasonryPlugin)

borodadada avatar Nov 28 '20 11:11 borodadada