Skip to content

Commit

Permalink
fix: when cannot freeze caused by read hash of undefined -> clean cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuxin Huo committed Jan 8, 2020
1 parent aa0383b commit db70fed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/TransformCompilationPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class TransformCompilationPlugin {
compilation,
});
} catch (e) {
logMessages.moduleFreezeError(compilation, module, e);
logMessages.serialBadCache(compiler, e);
pluginCompat.call(compiler, '_hardSourceResetCache', []);
}
});
},
Expand Down
3 changes: 2 additions & 1 deletion lib/TransformNormalModulePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,8 @@ class TransformNormalModulePlugin {
},
);
} catch (e) {
logMessages.moduleFreezeError(compilation, module, e);
logMessages.serialBadCache(compiler, e);
pluginCompat.call(compiler, '_hardSourceResetCache', []);
}
}
},
Expand Down

0 comments on commit db70fed

Please sign in to comment.