Difference between npm run watch and npm run watch-poll

Advaith picture Advaith · May 23, 2017 · Viewed 31.9k times · Source

What is the difference between npm run watch and npm run watch-poll in Laravel mix?

I cannot see any difference between the output they give.

Answer

Rwd picture Rwd · May 23, 2017

watch will listen for file changes, however, on certain systems this won't always work.

watch-poll periodically checks (polls) for changes e.g. every 1000ms it will manually check to see if any files have changed.

https://laravel.com/docs/5.4/mix#running-mix

https://webpack.js.org/configuration/watch/