Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3f4f6a8

Browse files
clydinfilipesilva
authored andcommittedJan 31, 2018
feat(@angular/cli): hide error/warning build output stacktraces
1 parent 555424e commit 3f4f6a8

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed
 

Diff for: ‎packages/@angular/cli/models/webpack-configs/utils.ts

+11-6
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,29 @@ export const ngAppResolve = (resolvePath: string): string => {
66

77
const webpackOutputOptions = {
88
colors: true,
9-
hash: true,
10-
timings: true,
11-
chunks: true,
9+
hash: true, // required by custom stat output
10+
timings: true, // required by custom stat output
11+
chunks: true, // required by custom stat output
1212
chunkModules: false,
1313
children: false, // listing all children is very noisy in AOT and hides warnings/errors
1414
modules: false,
1515
reasons: false,
1616
warnings: true,
17-
assets: false, // listing all assets is very noisy when using assets directories
18-
version: false
17+
errors: true,
18+
assets: true, // required by custom stat output
19+
version: false,
20+
errorDetails: false,
21+
moduleTrace: false,
1922
};
2023

2124
const verboseWebpackOutputOptions = {
2225
children: true,
2326
assets: true,
2427
version: true,
2528
reasons: true,
26-
chunkModules: false // TODO: set to true when console to file output is fixed
29+
chunkModules: false, // TODO: set to true when console to file output is fixed
30+
errorDetails: true,
31+
moduleTrace: true,
2732
};
2833

2934
export function getWebpackStatsConfig(verbose = false) {

Diff for: ‎packages/@angular/cli/tasks/build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default Task.extend({
4444
return reject(err);
4545
}
4646

47-
const json = stats.toJson('verbose');
47+
const json = stats.toJson(statsConfig);
4848
if (runTaskOptions.verbose) {
4949
this.ui.writeLine(stats.toString(statsConfig));
5050
} else {

Diff for: ‎packages/@angular/cli/tasks/serve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export default Task.extend({
262262
const server = new WebpackDevServer(webpackCompiler, webpackDevServerConfiguration);
263263
if (!serveTaskOptions.verbose) {
264264
webpackCompiler.plugin('done', (stats: any) => {
265-
const json = stats.toJson('verbose');
265+
const json = stats.toJson(statsConfig);
266266
this.ui.writeLine(statsToString(json, statsConfig));
267267
if (stats.hasWarnings()) {
268268
this.ui.writeLine(statsWarningsToString(json, statsConfig));

0 commit comments

Comments
 (0)
Please sign in to comment.