Skip to content

Commit

Permalink
fix: comment
Browse files Browse the repository at this point in the history
  • Loading branch information
h-a-n-a committed Nov 28, 2024
1 parent 7e3b008 commit 164686a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/rspack/src/Compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ class Compiler {

this.hooks.shutdown.tap("rspack:cleanup", () => {
if (!this.running) {
// Delayed rspack cleanup to the next tick.
// This supports calls to `fn rspack` to do something with `Stats` within the same tick.
process.nextTick(() => {
this.#instance = undefined;
this.#compilation && (this.#compilation.__internal__shutdown = true);
Expand Down

0 comments on commit 164686a

Please sign in to comment.