[WebStrom] Cannot detect file change to trigger webpack re-compile

Working with editors/IDEs supporting “safe write”

Note that many editors support “safe write” feature and have it enabled by default, which makes dev server unable to watch files correctly. “Safe write” means changes are not written directly to original file but to temporary one instead, which is renamed and replaces original file when save operation is completed successfully. This behaviour causes file watcher to lose the track because the original file is removed. In order to prevent this issue, you have to disable “safe write” feature in your editor.

  • VIM - set “:set backupcopy=yes” (see documentation)
  • IntelliJ - Settings -> System Settings -> Synchronization -> disable “safe write” (may differ in various IntelliJ IDEs, but you can still use the search feature)

Link: http://webpack.github.io/docs/webpack-dev-server.html#hot-mode

posted @ 2016-03-20 05:37  Zhentiw  阅读(287)  评论(0编辑  收藏  举报