diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-12-10 21:51:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-12-10 21:51:33 +0100 |
commit | 0469abd4a9c9270a1fdc962969e36e63699af8b4 (patch) | |
tree | f9864d4a4148621378958794cbbfdc2393733283 /node_modules/webpack/lib/Stats.js | |
parent | 6947e79bbc258f7bc96af424ddb71a511f0c15a3 (diff) |
upgrade dependencies
Diffstat (limited to 'node_modules/webpack/lib/Stats.js')
-rw-r--r-- | node_modules/webpack/lib/Stats.js | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/node_modules/webpack/lib/Stats.js b/node_modules/webpack/lib/Stats.js index 16c191714..6aa3d1ac9 100644 --- a/node_modules/webpack/lib/Stats.js +++ b/node_modules/webpack/lib/Stats.js @@ -100,6 +100,7 @@ class Stats { const requestShortener = new RequestShortener(context);
const showPerformance = optionOrLocalFallback(options.performance, true);
const showHash = optionOrLocalFallback(options.hash, true);
+ const showEnv = optionOrLocalFallback(options.env, false);
const showVersion = optionOrLocalFallback(options.version, true);
const showTimings = optionOrLocalFallback(options.timings, true);
const showAssets = optionOrLocalFallback(options.assets, true);
@@ -198,15 +199,22 @@ class Stats { text += e.message;
if(showErrorDetails && e.details) text += `\n${e.details}`;
if(showErrorDetails && e.missing) text += e.missing.map(item => `\n[${item}]`).join("");
- if(showModuleTrace && e.dependencies && e.origin) {
+ if(showModuleTrace && e.origin) {
text += `\n @ ${e.origin.readableIdentifier(requestShortener)}`;
- e.dependencies.forEach(dep => {
- if(!dep.loc) return;
- if(typeof dep.loc === "string") return;
- const locInfo = formatLocation(dep.loc);
- if(!locInfo) return;
- text += ` ${locInfo}`;
- });
+ if(typeof e.originLoc === "object") {
+ const locInfo = formatLocation(e.originLoc);
+ if(locInfo)
+ text += ` ${locInfo}`;
+ }
+ if(e.dependencies) {
+ e.dependencies.forEach(dep => {
+ if(!dep.loc) return;
+ if(typeof dep.loc === "string") return;
+ const locInfo = formatLocation(dep.loc);
+ if(!locInfo) return;
+ text += ` ${locInfo}`;
+ });
+ }
let current = e.origin;
while(current.issuer) {
current = current.issuer;
@@ -240,6 +248,11 @@ class Stats { if(showTimings && this.startTime && this.endTime) {
obj.time = this.endTime - this.startTime;
}
+
+ if(showEnv && options._env) {
+ obj.env = options._env;
+ }
+
if(compilation.needAdditionalPass) {
obj.needAdditionalPass = true;
}
@@ -546,6 +559,11 @@ class Stats { colors.normal("ms");
newline();
}
+ if(obj.env) {
+ colors.normal("Environment (--env): ");
+ colors.bold(JSON.stringify(obj.env, null, 2));
+ newline();
+ }
if(obj.publicPath) {
colors.normal("PublicPath: ");
colors.bold(obj.publicPath);
@@ -900,6 +918,7 @@ class Stats { chunkModules: true,
chunkOrigins: true,
depth: true,
+ env: true,
reasons: true,
usedExports: true,
providedExports: true,
|