Skip to content

Commit

Permalink
allow overriding webpack stats config
Browse files Browse the repository at this point in the history
  • Loading branch information
svengau committed Nov 25, 2019
1 parent 7a7d558 commit 9bcbb1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions bin/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ program
console.error(err);
return;
}

console.log(stats.toString({ color: true }));
console.log(stats.toString(stats.compilation.options.stats));
if (!server) {
startServer();
}
Expand All @@ -84,7 +83,7 @@ program
build
.run(cmd, { userWebpackConfig, useBabelrc })
.then(function(stats) {
console.log(stats.toString({ color: true }));
console.log(stats.toString(stats.compilation.options.stats));
})
.catch(function(err) {
console.error(err);
Expand Down
5 changes: 4 additions & 1 deletion lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ function webpackConfig(dir, { userWebpackConfig, useBabelrc } = {}) {
nodeEnv
},
bail: true,
devtool: false
devtool: false,
stats: {
colors: true
}
};
fs.readdirSync(dirPath).forEach(function(file) {
if (file.match(/\.(m?js|ts)$/)) {
Expand Down

0 comments on commit 9bcbb1a

Please sign in to comment.