webpack: --watch doesn't work in latest (1.4.15) webpack on osx yosemite 10.10
I have a single js file entry.js
with document.write("foo")
line and run webpack --watch entry.js bundle.js
. Webpack starts in watch mode, then I make some changes to a file and can’t see the update to the bundle.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 68 (6 by maintainers)
Commits related to this issue
- Use polling for web pack to see changes Not using polling is the default, but was not working for some reason. Seems to possibly be a bug in OS X 10. See [1] for some more details and discussion. [... — committed to ahuth/euchre by ahuth 9 years ago
- developing with webpack - Mention about Webpack issue #675 Related to https://github.com/webpack/webpack/issues/675. — committed to survivejs/react-book by bebraw 9 years ago
Webpack uses the new NewWatchingPlugin() by default in the latest version. I had to force the old watch plugin:
plugins: [ new webpack.OldWatchingPlugin() ]
This resolved the issue for me.
I tried shutting down Dropbox and Google Drive and then making some changes; they were not caught by watch. Of course, it may be that one of those two had already permanently changed the directory, and so I’ll try a new clone the next time I’m at a point without a bunch of outstanding code changes.
I tried Miller’s example script for chokidar (as shown in the README at https://github.com/paulmillr/chokidar) and it reported “change [filename]” each time I saved a file.
PS If we can confirm @ying22’s observation that taking weekend trips may resolve the issue, I’d prefer no fix be applied to the codebase—assuming the trips can also be taken during the week.
I was going crazy since a while with this non-watching issue, please for the love of mankind make a reference to this post somewhere. It saved me. Both
renaming
without uppercases andsudo
solved it. It doesn’t deserve a closed status. Thanks @akwuh & @mikeknoophappening for me too on vagrant Ubuntu 14.04.4. reloads when editing with vim but not with sublime 3
found solution here: http://andrewhfarmer.com/webpack-watch-in-vagrant-docker/