Skip to content

Commit ab2c02a

Browse files
committed
nicer looking stats
1 parent d766001 commit ab2c02a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎lib/Stats.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ Stats.prototype.toJson = function toJson(options, forToString) {
215215
if(showChildren) {
216216
obj.children = compilation.children.map(function(child) {
217217
var obj = new Stats(child).toJson(options, forToString);
218+
delete obj.hash;
219+
delete obj.version;
218220
obj.name = child.name;
219221
return obj;
220222
});
@@ -334,7 +336,7 @@ Stats.jsonToString = function jsonToString(obj, useColors) {
334336
normal("ms");
335337
newline();
336338
}
337-
if(obj.assets) {
339+
if(obj.assets && obj.assets.length > 0) {
338340
var t = [["Asset", "Size", "Chunks", "", "Chunk Names"]]
339341
obj.assets.forEach(function(asset) {
340342
t.push([

0 commit comments

Comments
 (0)