Skip to content

Commit

Permalink
Merge pull request #205 from svengau/master
Browse files Browse the repository at this point in the history
allow overriding webpack stats config
  • Loading branch information
swyxio authored Jan 13, 2020
2 parents ee88c52 + 9bcbb1a commit b6420f3
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 b6420f3

Please sign in to comment.