webpack-bundle-size-analyzer
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -34,2 +34,6 @@ /// <reference path="typings/typings.d.ts" /> | ||
var child = childrenBySize[_i]; | ||
++includedCount; | ||
var percentage = ((child.size / totalSize) * 100).toPrecision(3); | ||
outputFn("" + prefix + child.packageName + ": " + filesize(child.size) + " (" + percentage + "%)"); | ||
printDependencySizeTree(child, depth + 1, outputFn); | ||
remainder -= child.size; | ||
@@ -39,9 +43,7 @@ if (remainder < 0.01 * totalSize) { | ||
} | ||
++includedCount; | ||
var percentage_1 = ((child.size / totalSize) * 100).toPrecision(3); | ||
outputFn("" + prefix + child.packageName + ": " + filesize(child.size) + " (" + percentage_1 + "%)"); | ||
printDependencySizeTree(child, depth + 1, outputFn); | ||
} | ||
var percentage = ((remainder / totalSize) * 100).toPrecision(3); | ||
outputFn(prefix + "<self>: " + filesize(remainder) + " (" + percentage + "%)"); | ||
if (depth === 0 || remainder !== totalSize) { | ||
var percentage = ((remainder / totalSize) * 100).toPrecision(3); | ||
outputFn(prefix + "<self>: " + filesize(remainder) + " (" + percentage + "%)"); | ||
} | ||
} | ||
@@ -48,0 +50,0 @@ exports.printDependencySizeTree = printDependencySizeTree; |
@@ -20,3 +20,3 @@ /// <reference path="../typings/typings.d.ts" /> | ||
size_tree.printDependencySizeTree(depsTree[0], 0, function (line) { return output += '\n' + line; }); | ||
chai_1.expect(output).to.equal("\nmarked: 27.53 kB (14.9%)\n <self>: 27.53 kB (100%)\nlru-cache: 6.29 kB (3.40%)\n <self>: 6.29 kB (100%)\nstyle-loader: 717 B (0.379%)\n <self>: 717 B (100%)\n<self>: 150.33 kB (81.3%)"); | ||
chai_1.expect(output).to.equal("\nmarked: 27.53 KB (14.9%)\nlru-cache: 6.29 KB (3.40%)\nstyle-loader: 717 B (0.379%)\n<self>: 150.33 KB (81.3%)"); | ||
}); | ||
@@ -23,0 +23,0 @@ it('should print the bundle name', function () { |
@@ -0,1 +1,6 @@ | ||
## 2.0.2 | ||
- Fixed issue with package sizes not being output if a bundle had | ||
very small dependencies (#15). | ||
## 2.0.0 | ||
@@ -2,0 +7,0 @@ |
{ | ||
"name": "webpack-bundle-size-analyzer", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "A utility to find how your dependencies are contributing to the size of your Webpack bundles", | ||
@@ -5,0 +5,0 @@ "main": "build/size_tree.js", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
225
10175
7
1
0