Watch doesn`t work correctly with links
See original GitHub issueDo you want to request a feature or report a bug? Bug report.
What is the current behavior? When i create link in node_modules and set symlinks to false, I have problem with watch, it works sometimes (more often it doesn`t work)
If the current behavior is a bug, please provide the steps to reproduce.
- create link
- set symlinks to false
- change file by link
What is the expected behavior? Watch must work
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
node v8.9.3 npm 5.6.0 Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial 4.4.0-83-generic webpack 3.10.0
This issue was moved from webpack/webpack#6122 by @sokra. Orginal issue was by @arshtepe.
@evilebottnawi I have created repo https://bitbucket.org/CyBer_UA/webpack-demo/src/344771d7d4b403eb662a9c0e7f23aaedc920f0e9?at=master To reproduce you need:
cd repo/
npm link
cd ..
npm link simple-repo
webpack --watch
and after that you need to change file index.js in repo folder from
import test from "src/test";
to
import test from "./src/test";
and after webpack do nothing…
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (4 by maintainers)

Top Related StackOverflow Question
I believe the solution here is to set chokidar.followSymlinks to
trueif webpack’s resolve.symlinks is set to false: https://github.com/webpack/watchpack/blob/master/lib/DirectoryWatcher.js#L54@evilebottnawi The PR is at https://github.com/webpack/watchpack/pull/72, I believe.