-
Notifications
You must be signed in to change notification settings - Fork 99
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
vue-styled-components + Nuxt js #52
Comments
The issue should be that we need to learn if or how Because when you're using Nuxt, the first page is rendered in server side, but didn't inejct the style into generated html. |
+2 any update here? styled-components seems to be the most elegant (and browser compatible) solution for making dynamic styles.. I'd really love to use this in my nuxt project, but in it's current state you have to wrap the styled-component in a |
What needs to be done to get this working. I'm willing to submit a PR if pointed in the right direction |
When I worked on it nuxt was in alpha version and I never thought about that. |
Not used Nuxt or vue-styled-components yet but faced a similar issue integrating Styled components on the server with NextJS. The idea is rather simple: on the server, all CSS generated by styled components need to be collected and injected in the document header in a style tag It would then be a 4 steps process in
Nuxt requirements:
This requires
As an example (styled-components), models for those are on: https://github.com/styled-components/styled-components/tree/master/src/models. Note: I think SSR styled-components is an essential feature for framework adoption. That ranks near the top of my list. |
I think this issue title should probably be renamed as vue-styled-components should work on the server side in general, no matter if it's via Nuxt or some other method – currently vue-styled components is not working for server-side rendering at all. Also, since I'm not familiar with the source code myself, can anybody say if an approach such as the one mentioned by yannvr is an option (seems like this is the method react is using, so can probably also be used for Vue)? |
Hello people, It would be very cool have this feature, I know. I just ask also to you for a help to do that, I am focusing to bug fixing and updates, merging new PR's to let also the community make the difference. I am here for anything, if someone want to help me to do that, I'll be very grateful <3 |
I've had a go at implementing it and found out that styled components SSR was supported for React only so the feature we really need is vue-styled-component SSR (like @mrksbnch said). Then the Nuxt part would mostly be a boilerplate. @liqueflies: a new (open) feature request? |
Has anyone done this? |
Did someone managed to make nuxt and vue-styled-component work together ? |
@Trapdafifou The flash is still happening though |
@liqueflies any chance #112 could be merged in for SSR? |
@Jmeyering sorry for late reply but now I want to try update this part (maybe with help of you all). If you see #112 i gave it a try with no luck, also the opener of the PR is not convinced about that. I have understand where the problem is, I will try to check if I can do something with it. |
Hi all, I've created a pull request that at least temporarily patches the problem in a non-painful way. |
+3 any update on the issue? @IntusFacultas your PR seems to be pending still |
Yeah I've heard nothing in response unfortunately. |
Hi, what the problem with vue-styled-components + Nuxt js
nuxt/nuxt#3479
how to fix this promblem?
Thanks.
The text was updated successfully, but these errors were encountered: