-
Notifications
You must be signed in to change notification settings - Fork 399
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
SSR is not supported? #197
Comments
I don't use SSR myself and don't have time to learn at the moment, so unless someone can help on that, it is not supported. |
Hi,
and then on your component
|
I suspect this could be the only code that is causing the module to not work in SSR environment Line 9 in f06b8a5
I am able to use vuetable-2 in nuxt by changing For better compatibility, we could do more. See: #512 |
@amoshydra thanks. |
@FerX, Yes, I had to modify the source file and build it. Things I did to make this imported and render in nuxt
* btw, I am currently not using this project. Update@rhoseno98's method should work great in nuxt if you didn't need to statically import this table. I often dynamically import none-ssr compatible component in <template>
<div v-if="readyToRender">
<vue-table />
</div>
</template> import Vue from 'vue';
...
beforeMount() {
this.readyToRender = false;
import('vuetable-2')
.then((Vuetable) => {
Vue.use(Vuetable);
this.readyToRender = true;
});
}, |
Firstly, I'm sorry for the English I'm writing (I use Google Translate because I'm not very good at English). I just met the same issue when i use with nuxt ssr: I just found a way to fix it, use the autoload component, and soon nuxt 2.13 will add that functionality, no need to install this plugin anymore, but currently nuxt 2.12 forces us to install it. Documentation about autoload component: Set up in
In the template, just call the vuetable tag, and use v-if to wrap Vue's Lifecycle hooks. (refer @amoshydra)
Hope useful to you |
I'm still getting this error with nuxt when I upgraded this module. |
I'm trying to use vuetable-2 on Vue project with server side rendering. I have the following code
and I get an error
if i use
I get this error
The text was updated successfully, but these errors were encountered: