From 1eb5e8cf20057f3158fec8a153a6013fe41c9221 Mon Sep 17 00:00:00 2001 From: David Skoland Date: Tue, 27 Jan 2026 22:54:48 +0100 Subject: build.js --- build.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 build.js (limited to 'build.js') diff --git a/build.js b/build.js new file mode 100644 index 0000000..2e17866 --- /dev/null +++ b/build.js @@ -0,0 +1,19 @@ +const webpack = require('webpack'); +const config = require('./webpack.config.js'); + +const compiler = webpack(config); + +// Keep process alive +const keepAlive = setInterval(() => {}, 1000); + +compiler.run((err, stats) => { + clearInterval(keepAlive); + + if (err) { + console.error(err); + process.exit(1); + } + + console.log(stats.toString({ colors: true })); + compiler.close(() => process.exit(stats.hasErrors() ? 1 : 0)); +}); -- cgit