-
Notifications
You must be signed in to change notification settings - Fork 31
SSR ReferenceError: document is not defined #46
Comments
Hi, @runyasak Fixed build netlify with rollup-plugin-uglify. Please merge and publish 😉 |
up 😌 |
Has this issue been fixed.?? |
Hello, Yes of course but the creators of the repository still haven't done the merge. I fixed in this PR |
I just used your code version in your PR @Sitronik , it worked... thanks |
You are welcome, I am glad that i could help you |
I got this to work in Nuxt by using lazy-loading of the component, as well as wrapping it in the I have my globally registered component <template>
<no-ssr>
<vue-element-loading :active="active" :is-full-screen="isFullScreen" spinner="spinner" color="#8d655a" />
</no-ssr>
</template>
<script>
export default {
name: 'Loader',
components: {
VueElementLoading: () => {
if (process.client) {
return import('vue-element-loading');
}
},
},
props: {
active: { type: Boolean, default: false },
isFullScreen: { type: Boolean, default: false },
},
};
</script> For my solution, I was already wrapping the component anyway as I want it to be used consistently across my project with only a couple options available. |
Hi everyone I faced problem in vue ssr project
When I import vue-element-loading I get this error in ssr:
And in client:
500 | Internal Server Error
Fixed it all, please merge and publish to npm
Made the module even better I hope it will not be difficult for you to allocate a few minutes for this
Thanks
The text was updated successfully, but these errors were encountered: