Skip to content

Commit

Permalink
Use name instead of identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Feb 5, 2021
1 parent 9a02001 commit 22d126f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/next/build/webpack/plugins/build-stats-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ function reduceSize(stats: any) {
}

for (const module of chunk.modules) {
if (!module.identifier) {
if (!module.name) {
continue
}

const reducedModule: any = {
type: module.type,
moduleType: module.moduleType,
size: module.size,
identifier: module.identifier,
name: module.name,
}

if (module.reasons) {
for (const reason of module.reasons) {
if (!reason.moduleIdentifier) {
if (!reason.name) {
continue
}

Expand All @@ -44,7 +44,7 @@ function reduceSize(stats: any) {
})
}
}
// Identifier is part of the Map

modules.set(module.id, reducedModule)

if (!reducedChunk.modules) {
Expand Down

0 comments on commit 22d126f

Please sign in to comment.