MopTym / vue-waterfall

A waterfall layout component for Vue.js
MIT License
2.16k stars 258 forks source link

How to we integrate with Nuxt.jS? #33

Open rlam3 opened 6 years ago

rlam3 commented 6 years ago

How to we integrate with Nuxt.jS?

screen shot 2017-10-01 at 7 33 52 am
# plugins/vue-waterfall.js

import Vue from 'vue'
import VueWaterfall from 'vue-waterfall'

Vue.use(VueWaterfall)

@MopTym Thanks!

nikkanetiya commented 6 years ago

@rlam3 if you haven't solved this issue, turn off SSR. Because of if you won't specify this plugin will try to look for a document which will not be there in server render. This issue not related with vue-waterfall, you can close this issue.

{ src: '~/plugins/vue-waterfall.js', ssr: false }

lingsang2 commented 6 years ago

f324b74e-561e-435d-995d-9de94ea7e604

nikkanetiya commented 6 years ago

@lingsang2 you can't use waterfall if you are working with SSR. Turn off SSR to like this or else do bind components only on the client side, simply because if there will no document on a server it is only present in the client-side browser.

Nisthar commented 6 years ago

@nikkanetiya https://github.com/MopTym/vue-waterfall/issues/12#issuecomment-256695321

@MopTym Can you confirm if it works with SSR?

xmqywx commented 6 years ago

@Nisthar Just move the two vue file to your folder, like projectName/components/waterfall.vue :)

Why not work before:

webpack build vue to min.js, webpack did insert '