Using Laravel 5.4 and Mix, when I run npm run watch
it compiles everything once and looks like it is waiting for changes, but when I make changes to any of my asset files it doesn't seem to detect anything. Is anyone else having this issue in 5.4 or have a solution?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The solution was provided by Jeffrey Way over at Laracasts.
Try adding the --watch-poll flag to your package.json
script. Or just try:
node_modules/.bin/webpack --watch --watch-poll --config=node_modules/laravel-mix/setup/webpack.config.js
回答2:
npm run watch-poll
It's working on ubuntu as well And auto compiling on code changes. Thank you.