debug-require-webpack-plugin: Add null check for TypeScript.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-08-25 13:44:01 -07:00 committed by Tim Abbott
parent eef65d7e30
commit e6344bd1f5
1 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,9 @@ export default class DebugRequirePlugin implements WebpackPluginInstance {
(m) => { (m) => {
if (m instanceof NormalModule) { if (m instanceof NormalModule) {
const id = compilation.chunkGraph.getModuleId(m); const id = compilation.chunkGraph.getModuleId(m);
if (id === null) {
return false;
}
if (m.resource === debugRequirePath) { if (m.resource === debugRequirePath) {
hasDebugRequire = true; hasDebugRequire = true;
} }