ReduxSimpleStarter icon indicating copy to clipboard operation
ReduxSimpleStarter copied to clipboard

Can't update in browser

Open jeffski13 opened this issue 9 years ago • 7 comments

stupid question: am i supposed to be able to make a change in the index.js file and see that change reflected in the browser out of the box (aka with no modifications to any of this code)?

jeffski13 avatar Jan 20 '17 02:01 jeffski13

I have the same issue too. Changes to js file not reflected to browser after refresh. Need to re run using npm start to get it work

Any solution? @StephenGrider

niconatalie avatar Jan 29 '17 15:01 niconatalie

You can change the way your files are polled for changes by adding:

watchOptions: { poll: true }

to the webpack.config.js file inside of 'devServer' property of the 'config' object.

StephenGrider avatar Jan 30 '17 22:01 StephenGrider

Followed your suggestion @StephenGrider and it doesn't seem to make a difference?

paulvincentphillips avatar Mar 30 '17 09:03 paulvincentphillips

Also, if I do as above and use npm start I get thrown errors.

paulvincentphillips avatar Mar 30 '17 09:03 paulvincentphillips

Finally got back to this tutorial XD adding watchOptions: { poll: true } fixed it! NOTE: I deleted the git files, restarted my computer (windows 10), and ran apt-get update on my "Bash on Ubuntu on Windows". Then I did a fresh pull of the repository and npm install/start

jeffski13 avatar Apr 04 '17 02:04 jeffski13

Just to throw in...I did this on MAC OSX....delete, reclone, reinstall but this time with watchOptions: { poll: true }....and it works great!

Camboblaine avatar Apr 25 '17 12:04 Camboblaine

I was able to resolve this issue by changing the folder name where I cloned this repository. Issue was that my folder name contained spaces and brackets. I believe the web pack config file was not able to find the folder to recompile, hence having to restart every time. (Note: I am running on windows, realized problems can come from filenames with reserved characters in them)

mraisfaiqn avatar Jul 02 '21 11:07 mraisfaiqn