I'm working on an application that relies heavily on nodejs' filewatchers.
Now we found that IntelliJ's auto-save feature that writes to a file as you type / blur the window doesn't trigger nodejs filewatchers - at least not on mac.
The following simple test verifies this.
- Create a file called file.txt
- Create the following script in the same folder
- Edit file.txt in IntelliJ or Webstorm
- Nothing should be looked (where as if you edit the file in any other editor and save it you see change 0, change 1 etc.)
fs = require( "fs" );
i = 0;
fs.watch( "./file.txt", function(){
i++;
console.log( "change " + i );
});
Is there any workaround / way to make this work?