Skip to content

Commit

Permalink
feat: do not cleanup Rust instance
Browse files Browse the repository at this point in the history
  • Loading branch information
h-a-n-a committed Dec 13, 2024
1 parent 52a3e42 commit 32384da
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/rspack/src/Compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,16 @@ class Compiler {
new JsLoaderRspackPlugin(this).apply(this);
new ExecuteModulePlugin().apply(this);

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

get recordsInputPath() {
Expand Down

0 comments on commit 32384da

Please sign in to comment.