Skip to content

Commit 0224774

Browse files
author
Yuxin Huo
committed
fix: when cannot freeze caused by read hash of undefined -> clean cache
1 parent aa0383b commit 0224774

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/TransformCompilationPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TransformCompilationPlugin {
3636
compilation,
3737
});
3838
} catch (e) {
39-
logMessages.moduleFreezeError(compilation, module, e);
39+
pluginCompat.call(compiler, '_hardSourceResetCache', []);
4040
}
4141
});
4242
},

lib/TransformNormalModulePlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ class TransformNormalModulePlugin {
554554
},
555555
);
556556
} catch (e) {
557-
logMessages.moduleFreezeError(compilation, module, e);
557+
pluginCompat.call(compiler, '_hardSourceResetCache', []);
558558
}
559559
}
560560
},

0 commit comments

Comments
 (0)