build-browser.js 428 B

123456789101112131415161718
  1. 'use strict';
  2. const config = require('./webpack.config.js');
  3. const webpack = require('webpack');
  4. const compiler = webpack(config);
  5. console.log('Starting browser build...');
  6. compiler.run((err, stats) => {
  7. if (err) {
  8. console.err(stats.toString());
  9. console.err('Browser build unsuccessful.');
  10. process.exit(1);
  11. }
  12. console.log(stats.toString());
  13. console.log('Browser build successful.');
  14. process.exit(0);
  15. });