diff --git a/src/Bundler.js b/src/Bundler.js index 1bc7351ef44..10a5baf7c02 100644 --- a/src/Bundler.js +++ b/src/Bundler.js @@ -407,12 +407,11 @@ class Bundler extends EventEmitter { } async unwatch(path, asset) { + path = await fs.realpath(path); if (!this.watchedAssets.has(path)) { return; } - path = await fs.realpath(path); - let watched = this.watchedAssets.get(path); watched.delete(asset);