Skip to content

Commit

Permalink
fix #2798: deleting a file trigger a build
Browse files Browse the repository at this point in the history
  • Loading branch information
aurmartin committed Oct 16, 2024
1 parent 68029c5 commit a253c86
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1217,9 +1217,14 @@ Arguments:
await watchRun(path);
});

watcher.on("unlink", (path) => {
// this.logger.forceLog(`File removed: ${path}`);
watcher.on("unlink", async (path) => {
// Emulated passthrough copy logs from the server
if (!this.eleventyServe.isEmulatedPassthroughCopyMatch(path)) {
this.logger.forceLog(`File removed: ${path}`);
}

this.fileSystemSearch.delete(path);
await watchRun(path);
});
}

Expand Down

0 comments on commit a253c86

Please sign in to comment.