When some part of the code is behind a symlink (e.g. file: url in package.json) then compiling this code will resolve module IDs to be real filesystem path.
However when symlink path is passed to invalidate() of the bundle the symlink is not resolved so the file in question will not be invalidated and rebuilding will not work.
Easy fix would be to call fs.realpath() from onAddWatchFile().
When some part of the code is behind a symlink (e.g.
file:url in package.json) then compiling this code will resolve module IDs to be real filesystem path.However when symlink path is passed to
invalidate()of the bundle the symlink is not resolved so the file in question will not be invalidated and rebuilding will not work.Easy fix would be to call
fs.realpath()fromonAddWatchFile().