build.js
458 Bytes
'use strict';
process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';
process.on('unhandledRejection', (err) => { throw err; });
const webpack = require('webpack');
const config = require('../config/webpack.config.prod');
const paths = require('../config/paths');
const fs = require('fs-extra');
fs.emptyDirSync(paths.appBuild);
const compiler = webpack(config);
compiler.run((err, stats) => { console.log(stats.compilation.errors) });