From f5bff7b14c52fdd91afe76865ecec955b1f96539 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 9 Aug 2018 23:17:21 -0700 Subject: [PATCH] [fix] repeat fix from #797 for #717, in another place --- src/ExportMap.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ExportMap.js b/src/ExportMap.js index 1cb5dc3e9..66b212a21 100644 --- a/src/ExportMap.js +++ b/src/ExportMap.js @@ -38,7 +38,12 @@ export default class ExportMap { get size() { let size = this.namespace.size + this.reexports.size - this.dependencies.forEach(dep => size += dep().size) + this.dependencies.forEach(dep => { + const d = dep() + // CJS / ignored dependencies won't exist (#717) + if (d == null) return + size += d.size + }) return size }