webpack-bundle-diff
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -32,3 +32,2 @@ "use strict"; | ||
} | ||
const moduleName = (0, getModuleName_1.getModuleName)(module, compilation); | ||
const moduleReasons = (0, typeGuards_1.isModule)(module) | ||
@@ -47,2 +46,3 @@ ? [...compilation.moduleGraph.getIncomingConnections(module)] | ||
if (!module.modules) { | ||
const moduleName = (0, getModuleName_1.getModuleName)(module, compilation); | ||
const moduleSize = !(0, typeGuards_1.isModule)(module) ? module.size : module.size(); | ||
@@ -58,4 +58,5 @@ // This is just an individual module, so we can add it to the graph as-is | ||
: module.modules[0].size(); | ||
const moduleName = (0, getModuleName_1.getModuleName)(module.modules[0], compilation); | ||
// Assume the first hoisted module acts as the primary module | ||
addModuleToGraph(graph, Object.assign({ name: (0, getModuleName_1.getModuleName)(module.modules[0], compilation), containsHoistedModules: true, namedChunkGroups, size: moduleSize }, (0, processReasons_1.processReasons)(moduleReasons, moduleIdToNameMap))); | ||
addModuleToGraph(graph, Object.assign({ name: moduleName, containsHoistedModules: true, namedChunkGroups, size: moduleSize }, (0, processReasons_1.processReasons)(moduleReasons, moduleIdToNameMap))); | ||
// Other hoisted modules are parented to the primary module | ||
@@ -62,0 +63,0 @@ for (let i = 1; i < module.modules.length; i++) { |
{ | ||
"name": "webpack-bundle-diff", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Understand changes in webpack bundle size", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54688
1042