Reload website on JS changes

Can someone point me in the right direction?

Currently I’m using Sage 9 with Trellis and Bedrock. What I noticed is that whenever I make any changes to scss files, browser sync kicks and reloads the site with my new changes. It’s indispensable.

I did however notice, that this same workflow doesn’t carry over to javascript files. I see that in the console, webpack is rebundling my javascript, but the changes aren’t actually reflected until I manually reload the site. Any way to change this? I’m a little lost looking through the webpack file.

1 Like

Yep I am noticing the same issue. Came here looking for anyone else.

My console output:

[HMR] bundle rebuilding
client.js:132 [HMR] bundle rebuilt in 262ms
process-update.js:27 [HMR] Checking for updates on the server...
process-update.js:100 [HMR] Updated modules:
process-update.js:102 [HMR]  - ./assets/scripts/modules/AjaxSearch.js
process-update.js:107 [HMR] App is up to date.

I am having the same problem, also browser sync starts reloading page constantly. So ever time I make some change i JS files I have to rerun yarn run start.

Same happens with image files.

1 Like

Any luck with fixing this issue?
I have same problem and tried several things but no luck so far.

Have the same problem… Any news on that?

1 Like