This repository has been archived by the owner on Jun 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
HMR stops working when using Gradle continuous build #148
Comments
Since HMR with CSS worked already for me in the past, I used git bisect to figure out what change caused the above situation to appear. Turns out this issue started to appear when I separated my resources into Workable for me, but very unexpected. I'm posting my config files here if someone wants to investigate. Somebody else might run into this issue easily ... frontend/webpack.config.d/babel.js
frontend/webpack.config.d/css.js
frontend/webpack.config.d/images.js
frontend/build.gradle.kts
Compiled webpack-dev-server-run.js
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Having following css webpack config:
When I start my project with
gradle run
, I can navigate tobuild/js/resources/css
, edit an SCSS file and HMR will reload the css properly:The downside is that I would like to change the actual SCSS file in
src/main/resources
. This should work when usinggradle -t run
. Changing the SCSS file in this mode, also updates the file inbuild/js/resources/css
and HMR applies the change as expected:However, this only works twice. Starting from the 3rd change, no SCSS changes get applied anymore, no matter which SCSS file. HMR does not trigger in the browser, although the files in
build/js/resources/css
are updated.Browser log
Webpack log
Gradle log
The most problematic thing is that the changes don't even get applied after full page reload. The only way to get the changes is by re-running
gradle run
.The text was updated successfully, but these errors were encountered: