logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 6d6629eb505e6472ce57c31706ce0d21441fafdf
parent d9dbd7064b13b4bce8aa90c7691b7a2b2f97a73e
Author: Xnuk Shuman <admin@xnu.kr>
Date:   Sat, 10 Dec 2022 14:55:04 +0900

Throw non-zero exit code if webpack build fails

Not only `err`, `stats.hasErrors` also should be handled.
I found this bug in [Pipeline 42881 build] - some errors exist,
but build result was successful.

See also: https://webpack.js.org/api/node/#error-handling

[Pipeline 42881 build]: https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/225066

Diffstat:

Mbuild/build.js4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/build/build.js b/build/build.js @@ -36,4 +36,8 @@ webpack(webpackConfig, function (err, stats) { chunks: false, chunkModules: false }) + '\n') + if (stats.hasErrors()) { + console.error('See above for errors.') + process.exit(1) + } })