Skip to content

Commit

Permalink
feat: 打包出错返回出错code为1
Browse files Browse the repository at this point in the history
  • Loading branch information
imsunhao committed Mar 12, 2019
1 parent eb38b4d commit 071ebc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/compiler.webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function showError(stats: webpack.Stats, { isdev }: { isdev?: boolean } = {}) {
stats.compilation.errors.forEach(error => {
consola.fatal(error)
})
if (!isdev) return process.exit(0)
if (!isdev) return process.exit(1)
}
}

Expand Down Expand Up @@ -55,7 +55,7 @@ function prodCompiler({
warnings: false
})
)
showError(stats)
showError(stats, { isdev: false })
})
}

Expand Down

0 comments on commit 071ebc3

Please sign in to comment.