Skip to content

Commit dba4ecd

Browse files
committed
more info for in stats
for analyse tool
1 parent b75ce7a commit dba4ecd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Stats.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ Stats.prototype.toJson = function toJson(options, forToString) {
133133
}).map(function(reason) {
134134
var obj = {
135135
moduleId: reason.module.id,
136+
moduleIdentifier: reason.module.identifier(),
136137
module: reason.module.readableIdentifier(requestShortener),
138+
moduleName: reason.module.readableIdentifier(requestShortener),
137139
type: reason.dependency.type,
138140
userRequest: reason.dependency.userRequest
139141
}
@@ -156,6 +158,8 @@ Stats.prototype.toJson = function toJson(options, forToString) {
156158
var obj = {
157159
id: chunk.id,
158160
rendered: chunk.rendered,
161+
initial: !!chunk.initial,
162+
entry: !!chunk.entry,
159163
size: chunk.modules.reduce(function(size, module) { return size + module.size(); }, 0),
160164
names: chunk.name ? [chunk.name] : [],
161165
files: chunk.files.slice(),
@@ -177,6 +181,8 @@ Stats.prototype.toJson = function toJson(options, forToString) {
177181
return {
178182
moduleId: origin.module ? origin.module.id : undefined,
179183
module: origin.module ? origin.module.identifier() : "",
184+
moduleIdentifier: origin.module ? origin.module.identifier() : "",
185+
moduleName: origin.module ? origin.module.readableIdentifier(requestShortener) : "",
180186
loc: origin.loc ? obj.loc = origin.loc.start.line + ":" + origin.loc.start.column + "-" +
181187
(origin.loc.start.line != origin.loc.end.line ? origin.loc.end.line + ":" : "") + origin.loc.end.column : "",
182188
name: origin.name,

0 commit comments

Comments
 (0)