Skip to content

Commit b8db757

Browse files
authored
fix: should not free native compiler while compiler is running (#8437)
fix: should not free native compiler while compiler is running
1 parent e106158 commit b8db757

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/rspack/src/Compiler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ class Compiler {
249249
new ExecuteModulePlugin().apply(this);
250250

251251
this.hooks.shutdown.tap("rspack:cleanup", () => {
252-
this.#instance = undefined;
252+
if (!this.running) {
253+
this.#instance = undefined;
254+
}
253255
});
254256
}
255257

0 commit comments

Comments
 (0)