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 reloading not picking up changes to rails CSS #329

Closed
DEfusion opened this issue Sep 27, 2016 · 1 comment
Closed

Hot reloading not picking up changes to rails CSS #329

DEfusion opened this issue Sep 27, 2016 · 1 comment

Comments

@DEfusion
Copy link

DEfusion commented Sep 27, 2016

I've tried making changes to both applicaiton_non_webpack.css and application_static.scss but I have to do a refresh in order for them to be picked up.

# application.html.erb
 <%= env_stylesheet_link_tag(
      static: 'application_static',
      hot: 'application_non_webpack',
      media: 'all'
    ) %>
<!-- output -->
<link rel="stylesheet" media="all" href="/assets/application_static.self-a63c83d31995d61cb5a658d5e5ee02cc80232bb2ac87c8d12cfc28036f82c8e3.css?body=1" />
<link rel="stylesheet" media="all" href="/assets/application_non_webpack.self-af04b226fd7202dfc532ce7aedb95a0128277937e90d3b3a3d35e1cce9e16886.css?body=1" />

I'm not sure what I've done wrong, changes to JSX files or the related component scss get picked up -- but I'm not sure I want to use CSS modules in my project. Is there a way to get the main stylesheets hot reloading?

I get the exact same behaviour by checking out this project too.

@DEfusion DEfusion changed the title Hot reloading not picking up changes to main CSS Hot reloading not picking up changes to rails CSS Sep 27, 2016
@Judahmeek
Copy link
Contributor

Hot reloading is functionality provided by the use of the Webpack Dev Server: http://andrewhfarmer.com/understanding-hmr/

It doesn't work on code that Webpack is not watching.

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