diff --git a/packages/next/build/webpack/plugins/build-stats-plugin.ts b/packages/next/build/webpack/plugins/build-stats-plugin.ts index 9d7cc674aab09..bc8a6daf4c918 100644 --- a/packages/next/build/webpack/plugins/build-stats-plugin.ts +++ b/packages/next/build/webpack/plugins/build-stats-plugin.ts @@ -41,7 +41,7 @@ function reduceSize(stats: any) { if (module.reasons) { for (const reason of module.reasons) { - if (!reason.moduleName) { + if (!reason.moduleName || reason.moduleId === module.id) { continue }