Skip to content

Commit db70fed

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

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/TransformCompilationPlugin.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class TransformCompilationPlugin {
3636
compilation,
3737
});
3838
} catch (e) {
39-
logMessages.moduleFreezeError(compilation, module, e);
39+
logMessages.serialBadCache(compiler, e);
40+
pluginCompat.call(compiler, '_hardSourceResetCache', []);
4041
}
4142
});
4243
},

lib/TransformNormalModulePlugin.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,8 @@ class TransformNormalModulePlugin {
554554
},
555555
);
556556
} catch (e) {
557-
logMessages.moduleFreezeError(compilation, module, e);
557+
logMessages.serialBadCache(compiler, e);
558+
pluginCompat.call(compiler, '_hardSourceResetCache', []);
558559
}
559560
}
560561
},

0 commit comments

Comments
 (0)