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

Feature: Possible example of HMR of .css files? #229

Open
renshenhe opened this issue Jun 14, 2017 · 3 comments
Open

Feature: Possible example of HMR of .css files? #229

renshenhe opened this issue Jun 14, 2017 · 3 comments

Comments

@renshenhe
Copy link

I am having a little trouble setting up hot reloading when styles are changed for .scss files in development for a SSR app.

I am currently using node-sass to watch for changes of a main.scss file and generating a .css in a public folder where is rendered from the server to load the styles.

The issue with my current approach is it requires manual refresh for style changes and for me to add @import of every component's style in main.scss so node-sass does not create a .css variant of component's .scss file in the component's directory.

I am hoping to setup webpack where I can import ./style.scss in the component and should the component be used extract-text-webpack-plugin would be able to handle the conversion and add it to a single .css file. I would also hope to have it all hot-reloadable should it be possible but finding a solution have seems to elude my searches. I am fine with manually refreshing styles but hope for a better setup than my current.

@akash0675
Copy link

This issue can be solved by using isomorphic-webpack

Sent from my LGE Nexus 5X using FastHub

@renshenhe
Copy link
Author

I have never been savvy with webpack to be able to navigate integrating isomorphic-webpack in my current setup. The documentation is a little sparse at the moment in covering use cases.

@akash0675
Copy link

Cool, I'm working on the same.

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

No branches or pull requests

3 participants