-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Nuxt integration #230
Comments
I don't really know... |
After reading this, I don't think so: https://blog.lichter.io/posts/the-guide-to-write-universal-ssr-ready-vue-compon |
@Romick2005 from what i have played with i did get it to work by defining a plugin and then setting ssr to false. Refer to this https://vue-grid.glitch.me/ & this: nuxt/nuxt#975 |
vue-grid-layout does not support SSR, so you must handling CSR |
@gmsa, maybe add this to README or wiki?
import Vue from 'vue';
import VueGridLayout from 'vue-grid-layout'
Vue.component('grid-layout', VueGridLayout.GridLayout);
Vue.component('grid-item', VueGridLayout.GridItem);
plugins: [
{src: '~/plugins/vue-grid', ssr: false},
],
<no-ssr></no-ssr> |
Is there any other way ? i don't want use it in gobal . |
Thanks so much. Still working for any who's interested. |
@zlodes is this still working? I did the exact same thing as you did (except the no-ssr tag, that I replaced with client-only because of depreaction). I get 7 errors:
|
with Vue3 out now supporting SSR along with nuxt in talks of doing a Vue 3 version sometime in the future, are their plans on adding to this plugin to support SSR of any kind? If not then it should be posted here and this issue be closed instead of having an open issue talking about it since 2018 because it makes me think someone is actively working towards or planning to actively work towards SSR. (Just my two cents) |
Is it possible for someone to create a demo project working with SSR? I've never used SSR and it would go a long way to help... |
Solution for nuxt 3
"dependencies": {
"vue-grid-layout": "3.0.0-beta1"
}
import { defineNuxtPlugin } from '#app'
// @ts-ignore
import VueGridLayout from 'vue-grid-layout'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(VueGridLayout)
})
<client-only>
<grid-layout>
<grid-item></grid-item>
</grid-layout>
</client-only> |
resize option is not working with nuxt 3. |
@brolnickij such a life saver! Really appreciate the example with Nuxt 3 |
@brolnickij @g-tejas @zlodes |
It is possible to handle Nuxt ssr using this library?
The text was updated successfully, but these errors were encountered: