webpack --watch isn't compiling changed files

alcedo picture alcedo · Nov 3, 2014 · Viewed 71.8k times · Source

I tried running webpack --watch and after editing my JS files, it doesn't trigger an auto-recompilation.

I've tried reinstalling webpack using npm uninstall but it's still not working.

Any ideas?

Answer

César D. Velandia picture César D. Velandia · Nov 5, 2015

If your code isn't being recompiled, try increasing the number of watchers (in Ubuntu):

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Source: https://webpack.github.io/docs/troubleshooting.html