Skip to content

Commit

Permalink
fix: fix panic on irrelevant file deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
fu050409 committed Jan 9, 2025
1 parent a30ba66 commit b33bab3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ export class Server extends httpServer {
});

this.watcher.on('unlink', async (file: string) => {
// Fix #2035, skip if the file is irrelevant
if (!this.compiler.hasModule(file)) return;

const parentFiles = this.compiler.getParentFiles(file);
const normalizeParentFiles = parentFiles.map((file) =>
normalizePath(file)
Expand Down

0 comments on commit b33bab3

Please sign in to comment.