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

reload #79

Open
rmsheppard opened this issue Feb 14, 2018 · 4 comments
Open

reload #79

rmsheppard opened this issue Feb 14, 2018 · 4 comments

Comments

@rmsheppard
Copy link

I have this set up and working in my project. However, it only is able to execute on initial compile. Is there any way to run this upon hot module reload?

@michalkvasnicak
Copy link
Owner

@rmsheppard try to set devMode to true it should disable cache.

@benedfit
Copy link

benedfit commented Jul 18, 2018

I'm not entirely sure the caching functionality is working as expected. Subsequent executions seem to result in the output of extractCss being a blank file when no changes are found. The way I have currently got around this is to prepend BABEL_DISABLE_CACHE=1 to the start of my executing script

EDIT: I see this is tracked in #45

@petermikitsh
Copy link

I've set devMode to true and have extractCss specified. I'm running babel with the --watch flag, but my extractCss file doesn't update.

@neilsutcliffe
Copy link

neilsutcliffe commented Apr 14, 2019

It's been a while since the last post, but I've got the same issue, and I think I might have an idea. I'm using module.scss files btw, but it should be the same.

The reason that webpack watch doesn't get re-triggered seems to be that webpack doesn't know about the scss file. Babel effectively strips out the scss file and replaces it with the inline class references, and webpack doesn't even parse the scss file.

As far as webpack knows, these files do not exist.

I'm thinking...

  1. Force webpack to still open the scss somehow, whilst ignoring the result.
  2. Manually trigger babel on any .scss file change.
  3. Force webpack to monitor any .scss files.

If anyone knows how to do any of the above, that might help me.

Some context. I'm making an express MVC app that uses React as a view-engine with no client side javascript at all. I still want Sass modules, as it makes managing code easier.

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

5 participants