Replies: 3 comments
-
Your knowledge of this topic is weak. Fixing this issue takes up about 2/3's of the time I put into this project
This is a bootstrap issue. But it is also Carlos's issue since he decided to rely on Bootstrap to make certain systems work.
I agree. Open source software is badly abused. Very disappointing
Client only should only be a requirement for components on this list: https://github.com/bootstrap-vue/bootstrap-vue-next/projects/5 . It may be possible that some components internally use these components for functionality, so the list may contain hidden elements.
This could be a good option. Though, manually using clientonly as said previously may be better if you're willing to put in the work. That way you do get most of the benefits of SSR, rather than just nuking everything. Plugins could also have a different issues, but you could use the ModuleOptions with Nuxt to disable these https://github.com/bootstrap-vue/bootstrap-vue-next/blob/main/packages/bootstrap-vue-next/nuxt.ts#L84 . Though this would be trial and error, since I don't have an exact list on my head on their state. They all should be updated at some point.
It's not really obvious to those that don't have a deep knowledge of Bootstrap, Nuxt, and the state of this repository. Which is why this discussion post is probably good. Though, most solutions have been stated at some point in some issues "somewhere" |
Beta Was this translation helpful? Give feedback.
-
Your knowledge of this topic is weak. Fixing this issue takes up about
2/3's of the time I put into this project
I apologise, I didn't realise it was actively taking up that much of
someone's time. There's a comment in
https://github.com/bootstrap-vue/bootstrap-vue-next/issues/232#issuecomment-1095041842
which suggests it wasn't a priority, though things might have moved on
since then.
>Using to prevent any Bootstrap components loading during the SSR.
>
Client only should only be a requirement for components on this list:
https://github.com/bootstrap-vue/bootstrap-vue-next/projects/5 . It may
be possible that some components internally use these components for
functionality, so the list may contain hidden elements.
That's a useful list. Thanks.
…Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
At this time, I believe the library was not buildable. There were major issues with an early update of vue-tsc that broke the entire library. One could see how SSR was not a high concern as opposed to the entire library not being able to be deployed. Though this was nearly a year ago, and priorities have certainly shifted. |
Beta Was this translation helpful? Give feedback.
-
TLDR: use SSR but don't render your bootstrap components.
This post is to help anyone who's searching on this repo by suggesting an approach which might work for them.
Background
My understanding and experience is that Nuxt SSR doesn't work with this project - partly because of issues with Bootstrap itself, and partly because the people very kindly working on this project aren't particularly interested in making it work. And since this is all voluntary, nobody could criticise them for that unless they wanted to pitch in and help.
Work-around
I've been trying to work out how to deal with this in a project where:
Facebook doesn't execute JS when previewing links - it relies entirely on the meta tags. Crawlers like Google generally execute JS now, but Facebook doesn't.
On the plus side, it relies entirely on the meta tags.
What I've ended up doing is turning SSR on, but
.client
plugin.<client-only>
to prevent any Bootstrap components loading during the SSR.const component = () => import(X)
) to avoid pulling in code and packages which relies onwindow
etcThat means I can execute all my
setup
code. So I get the meta tags in place, and store hydration. But the actual visible stuff happens on the client.This sounds quite obvious now I've written it, but it took me a while to get to this point.
Beta Was this translation helpful? Give feedback.
All reactions