coreui / coreui-vue

Bootstrap 5 based Vue 3 components and directives. CoreUI for Vue.js replaces and extends the Bootstrap 5 javascript. Components have been built from scratch as true Vue 3 components.
https://coreui.io/vue/docs/getting-started/introduction.html
MIT License
605 stars 128 forks source link

Support SSR rendering #38

Closed nea closed 4 years ago

nea commented 4 years ago

Hi there

It would be awesome if you could support SSR rendering.

vue-perfect-scrollbar is one showstopper, but there is the 1.0-dev branch, which could be used, or vue2-perfect-scrollbar. Additionally, some css rollup and changes here and there regarding accesing the DOM document might be necessary.

This would help in supporting Nuxt.js in the future, a valuable addition I think.

Thanks

woothu commented 4 years ago

Hi, thank you for reporting this issue!

We were already investigating this issue and there is a problem with both of those implementations: they both don't support switcher prop correctly, which is necessary for removing the perfect-scrollbar instance when the sidebar is minimized.

We are planning to introduce our own wrapper for perfect-scrollbar in version 3.0 of the library, which is coming soon.

wrapper: https://github.com/coreui/coreui-vue/blob/dev/src/components/Sidebar/CPerfectScrollbar.vue

nea commented 4 years ago

Hi @woothu

Thanks for the info and the outlook. Good to know you are challenging this task in 3.0. Looking forward to it ^^

Thanks a lot

woothu commented 4 years ago

In 3.0 CScrollbar component supports SSR