Difference between npm run watch and npm run watch-poll

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

I do not see any difference between the results they give.

+26
source share
2 answers

watch will listen for file changes, however on some systems this does not always work.

watch-poll periodically checks (polls) for changes, for example, every 1000 ms it will manually check if any files have changed.

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

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

+39
source

watch-poll is an alternative to watch in some watch environments it may not track changes properly, therefore watch-poll was implemented.

The survey checks the files every x seconds, and does not automatically gain changes when viewing.

You can read the docs for more information about the mix.

+11
source

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


All Articles