aboutsummaryrefslogtreecommitdiff
path: root/build.js
blob: 2e178668ab11a2800dc96117d6608cdfcdae69e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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));
});