Skip to content

Commit a0dfd25

Browse files
asprousejogold
authored andcommitted
Fix stats output error when running webpack serially (#55)
1 parent e726193 commit a0dfd25

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/lib/wpack.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ const run = configs =>
6262
webpack(configs, (err, stats) => {
6363
if (err) reject(new Error(`Webpack compilation error: ${err}`));
6464

65+
const config = Array.isArray(configs) ? configs[0] : configs;
66+
6567
// eslint-disable-next-line no-console
66-
console.log(stats.toString(configs[0].stats ? configs[0].stats : {
68+
console.log(stats.toString(config.stats ? config.stats : {
6769
colors: true,
6870
hash: false,
6971
chunks: false,

0 commit comments

Comments
 (0)