Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue-masonry not work with vue-server-renderer #94

Open
daitkhealex opened this issue Nov 19, 2019 · 3 comments
Open

vue-masonry not work with vue-server-renderer #94

daitkhealex opened this issue Nov 19, 2019 · 3 comments

Comments

@daitkhealex
Copy link

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)

@shershen08
Copy link
Owner

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 ?

@borodadada
Copy link

Vue SSR not work!

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

@scheinercc
Copy link

@daitkhealex did that work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants