Skip to content

Commit f026310

Browse files
committed
only record number ids
fixes webpack#7381
1 parent 962cea5 commit f026310

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/RecordIdsPlugin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class RecordIdsPlugin {
2121
if (!records.modules.byIdentifier) records.modules.byIdentifier = {};
2222
if (!records.modules.usedIds) records.modules.usedIds = {};
2323
for (const module of modules) {
24+
if (typeof module.id !== "number") continue;
2425
const identifier = portableIds
2526
? identifierUtils.makePathsRelative(
2627
compiler.context,
@@ -110,6 +111,7 @@ class RecordIdsPlugin {
110111
if (!records.chunks.bySource) records.chunks.bySource = {};
111112
const usedIds = new Set();
112113
for (const chunk of chunks) {
114+
if (typeof chunk.id !== "number") continue;
113115
const name = chunk.name;
114116
if (name) records.chunks.byName[name] = chunk.id;
115117
const sources = getChunkSources(chunk);

0 commit comments

Comments
 (0)