Skip to content
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

Glamor global styles sometimes don't update until you restart the server #1957

Closed
silvenon opened this issue May 12, 2017 · 10 comments
Closed

Comments

@silvenon
Copy link
Contributor

You should be able to reproduce this in your glamorous example. Try changing values here – sometimes it will hot reload, sometimes you'll have to refresh the page and sometimes you'll have to restart the server. The last one scares me. πŸ˜„

I'm not sure whether this is an issue with Next.js or glamor, I'm very new to server-side rendering.

@andrewwong97
Copy link

I've had similar issues, here is my post #2210
Have you had any success since you last posted?

@silvenon
Copy link
Contributor Author

silvenon commented Jun 14, 2017

@andrewwong97 No 😞

I've since switched to styled-components, so I'm facing different problems now. πŸ˜…

@bliitzkrieg
Copy link

Does anybody have a fix to this - I am experiencing it with style component and the issue was closed without any solution it seems.

@silvenon
Copy link
Contributor Author

@bliitzkrieg if you're in a hurry to move forward with whatever you're doing, you could try emotion, which has a similar syntax, but not all of the features of styled-components. There is an up-to-date example of using it with Next.js, it works very well with SSR.

@bliitzkrieg
Copy link

I'll check it out - thanks!

@ctrlplusb
Copy link

@bliitzkrieg did you have any luck with emotion? I am experiencing the same thing.

Paging @threepointone & @kentcdodds - any insight here? I really don't want to move away from glamorous.

@kentcdodds
Copy link

Weird.. I don't remember having any trouble like this with the glamorous website...

@ctrlplusb
Copy link

@kentcdodds very strange, have just gone through the glamorous website and don't notice anything discernibly different to my configuration. I'll try pull it down later and run some tests.

@ctrlplusb
Copy link

FYI everyone the reason my hot reloading wasn't working was because some invalid CSS rules were being generated - specifically a media query lacking the closing ")". Strangely the CSS didn't break on the first load, or even the first HMR - it started breaking on the second HMR. Le strange. I'll try to lint my CSS-in-JS in the future.

@lock
Copy link

lock bot commented May 10, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants