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

Hot reloaded styles not persisting on route change #32

Closed
Ehesp opened this issue Apr 13, 2016 · 0 comments
Closed

Hot reloaded styles not persisting on route change #32

Ehesp opened this issue Apr 13, 2016 · 0 comments
Assignees

Comments

@Ehesp
Copy link

Ehesp commented Apr 13, 2016

Hello

We've got this module in our application, setup as per the README. We also have hot module reloading enabled. When changing styles (SCSS), the page hot reloads and the styles are updated. However if we navigate to a different page (client side using React Router) and then back to the original page the styles have reverted back.

When we navigate back, the console shows:
image

This should be blue (what it changes to after hot reloading). However when we navigate into the file, the color is actually correct:
image

Another thing we noticed, was that this is only happening on components which are rendered on page load. Hot reloading of styles persists if we navigate to a page which the client loads. It has nothing to do with the initial styles injected by the client as we removed this and the same issue persisted.

Our project is here: https://github.com/teamfa/sails-universal-react-starter

We've removed loads of Webpack options/config but the issue still exists. Any idea what this could be?

frenzzy added a commit to frenzzy/isomorphic-style-loader that referenced this issue Apr 13, 2016
Now, if you require styles for the second time of from another place, it will return the new styles and not those which you seen before first hot reload.

fix kriasoft#32
frenzzy added a commit to frenzzy/isomorphic-style-loader that referenced this issue Apr 14, 2016
Now, if you require styles for the second time of from another place, it will return the new styles and not those which you seen before first hot reload.

fix kriasoft#32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants