diff options
| author | David Skoland <davidskoland@gmail.com> | 2026-01-27 22:54:48 +0100 |
|---|---|---|
| committer | David Skoland <davidskoland@gmail.com> | 2026-01-27 22:54:48 +0100 |
| commit | 1eb5e8cf20057f3158fec8a153a6013fe41c9221 (patch) | |
| tree | 8e2768a05bc03cd8063ffa665dd811bc66736d3c | |
| parent | 5b9b1b7e8102857a04ce9c7a7b88a3c00b1eebf3 (diff) | |
build.js
| -rw-r--r-- | build.js | 19 |
1 files changed, 19 insertions, 0 deletions
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)); +}); |
