From a1d909aad06134cbd07cd06997a6c89910275e11 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Sat, 27 Jan 2018 10:53:20 -0500 Subject: [PATCH] Prefer c.modules (fixes #467) --- src/lib/webpack/run-webpack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/webpack/run-webpack.js b/src/lib/webpack/run-webpack.js index 9dc8c32e5..5e1dce2eb 100644 --- a/src/lib/webpack/run-webpack.js +++ b/src/lib/webpack/run-webpack.js @@ -136,7 +136,7 @@ export function writeJsonStats(stats) { function strip(stats) { stats.modules.forEach(stripLoaderFromModuleNames); stats.chunks.forEach(c => { - (c.mapModules!=null ? c.mapModules(Object) : c.getModules()).forEach(stripLoaderFromModuleNames); + (c.modules || (c.mapModules!=null ? c.mapModules(Object) : c.getModules())).forEach(stripLoaderFromModuleNames); }); if (stats.children) stats.children.forEach(strip); }