Skip to content

Commit b6420f3

Browse files
authored
Merge pull request #205 from svengau/master
allow overriding webpack stats config
2 parents ee88c52 + 9bcbb1a commit b6420f3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Diff for: bin/cmd.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ program
6363
console.error(err);
6464
return;
6565
}
66-
67-
console.log(stats.toString({ color: true }));
66+
console.log(stats.toString(stats.compilation.options.stats));
6867
if (!server) {
6968
startServer();
7069
}
@@ -84,7 +83,7 @@ program
8483
build
8584
.run(cmd, { userWebpackConfig, useBabelrc })
8685
.then(function(stats) {
87-
console.log(stats.toString({ color: true }));
86+
console.log(stats.toString(stats.compilation.options.stats));
8887
})
8988
.catch(function(err) {
9089
console.error(err);

Diff for: lib/build.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ function webpackConfig(dir, { userWebpackConfig, useBabelrc } = {}) {
115115
nodeEnv
116116
},
117117
bail: true,
118-
devtool: false
118+
devtool: false,
119+
stats: {
120+
colors: true
121+
}
119122
};
120123
fs.readdirSync(dirPath).forEach(function(file) {
121124
if (file.match(/\.(m?js|ts)$/)) {

0 commit comments

Comments
 (0)