vue-stack-grid
vue-stack-grid copied to clipboard
stack is not working on SSR production, not render stack to div (Nuxt.js)
Follow #11 @guastallaigor
in plugins/vue-stack-grid.js
import Vue from 'vue'
import { Stack, StackItem } from 'vue-stack-grid'
Vue.component('Stack', Stack)
Vue.component('StackItem', StackItem)
And then, in your nuxt.config.js you import it, and set the mode: 'client'.
plugins: [
{ src: '~/plugins/vue-stack-grid', mode: 'client' }
]
testing on index.vue
<v-flex d-flex>
<Stack :monitor-images-loaded="true" :column-min-width="320" :gutter-width="8" :gutter-height="8">
<StackItem v-for="i in 100" :key="i">
<img src="https://i.imgur.com/0ui5ltX.jpg" />
</StackItem>
</Stack>
</v-flex>
After build:
What is the expected behavior? It seems you are creating them in a cycle.
Got the same problem here. Funnily enough, it only fails when refreshing the page. When navigating via a nuxt-link it works perfectly fine.
Edit: This only happens when deployed to github pages, it works perfectly fine while running in developement mode.
@carylaw (@leoVolk) I'm not sure I understand the problem and how it's related to #11. Could you clarify?