Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): show full error stats #2879

Merged
merged 1 commit into from
Nov 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(build): show full error stats
filipesilva committed Oct 25, 2016

Verified

This commit was signed with the committer’s verified signature. The key has expired.
tvdeyen Thomas von Deyen
commit 13f2be6411191925bfe93cc200c6018b13dceceb
14 changes: 4 additions & 10 deletions packages/angular-cli/tasks/build-webpack.ts
Original file line number Diff line number Diff line change
@@ -26,9 +26,6 @@ export default <any>Task.extend({
runTaskOptions.aot
).config;

// fail on build error
config.bail = true;

const webpackCompiler: any = webpack(config);

const ProgressPlugin = require('webpack/lib/ProgressPlugin');
@@ -39,21 +36,18 @@ export default <any>Task.extend({

return new Promise((resolve, reject) => {
webpackCompiler.run((err: any, stats: any) => {
if (err) { return reject(err); }

// Don't keep cache
// TODO: Make conditional if using --watch
webpackCompiler.purgeInputFileSystem();

if (err) {
lastHash = null;
console.error(err.details || err);
reject(err.details || err);
}

if (stats.hash !== lastHash) {
lastHash = stats.hash;
process.stdout.write(stats.toString(webpackOutputOptions) + '\n');
}
resolve();

return stats.hasErrors() ? reject() : resolve();
});
});
}