Caching issue using webpack-dev server

I am having problems starting webpack-dev server. Whenever I save a file and compiled changes, they are not reflected in the browser. (No errors on the command line)

I run the following command:

webpack-dev-server --progress --color

However, if I run webpack every time I have a change, this is reflected in my browser.

I run Chrome on my Mac (the latest version of OSX), and I turned on the option "Disable cache when devtools is open." Needless to say, but hey - you never know, I have DevTools open .. :)

Did I miss a simple step here?

+5
source share
1 answer

I had the same problem and I used the dist/app.js file in html and not the app.js generated by webpack-dev-server.

Using this in my html solved the problem:

 <script src="vendor.js"></script> <script src="app.js"></script> 
+1
source

Source: https://habr.com/ru/post/1234622/


All Articles