Skip to content

Commit b7f1f2f

Browse files
author
Morten N.O. Henriksen
committed
Compilation.modules changed to type Set
reference: comment by @slorber #9994 (comment)
1 parent 8f81bc7 commit b7f1f2f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-dev-utils/evalSourceMapMiddleware.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ function base64SourceMap(source) {
1414
}
1515

1616
function getSourceById(server, id) {
17-
const module = server._stats.compilation.modules.find(m => m.id == id);
17+
const module = Array.from(server._stats.compilation.modules).find(
18+
(m) => server._stats.compilation.chunkGraph.getModuleId(m) == id,
19+
);
1820
return module.originalSource();
1921
}
2022

0 commit comments

Comments
 (0)