Skip to content

Commit ad02d3c

Browse files
committed
sorted out a little bug
1 parent 820f304 commit ad02d3c

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

bin/webpack.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ if(!outputOptions.json) {
9090
outputOptions.chunks = bool;
9191
});
9292

93-
ifArg("hide-modules", function(bool) {
94-
outputOptions.modules = !bool;
95-
});
96-
9793
ifArg("display-reasons", function(bool) {
9894
outputOptions.reasons = bool;
9995
});
@@ -112,6 +108,13 @@ if(!outputOptions.json) {
112108
outputOptions.reasons = true;
113109
}
114110

111+
ifArg("hide-modules", function(bool) {
112+
if(bool) {
113+
outputOptions.modules = false;
114+
outputOptions.chunkModules = false;
115+
}
116+
});
117+
115118
var webpack = require("../lib/webpack.js");
116119

117120
Error.stackTrackLimit = 30;

lib/Stats.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,15 @@ Stats.jsonToString = function jsonToString(obj, useColors) {
449449
normal(" ");
450450
}
451451
if(origin.module) {
452-
var module = modulesByIdentifier["$"+origin.module];
453452
normal("[");
454-
normal(module.id);
453+
normal(origin.moduleId);
455454
normal("] ");
456-
bold(module.name);
457-
if(origin.loc) {
455+
var module = modulesByIdentifier["$"+origin.module];
456+
if(module) {
457+
bold(module.name);
458458
normal(" ");
459+
}
460+
if(origin.loc) {
459461
normal(origin.loc);
460462
}
461463
}

0 commit comments

Comments
 (0)