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
aurelien committed Oct 12, 2024
1 parent 43d57c6 commit 9bbe15c
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 9bbe15c

Please sign in to comment.