old_contents: /**
   * React Starter Kit (https://www.reactstarterkit.com/)
   *
   * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.txt file in the root directory of this source tree.
   */
  
  import webpack from 'webpack';
  import webpackConfig from './webpack.config';
  
  /**
   * Creates application bundles from the source files.
   */
  function bundle() {
    return new Promise((resolve, reject) => {
      webpack(webpackConfig).run((err, stats) => {
        if (err) {
          return reject(err);
        }
  
        console.info(stats.toString(webpackConfig[0].stats));
        return resolve();
      });
    });
  }
  
  export default bundle;
  
new_contents: /**
   * React Starter Kit (https://www.reactstarterkit.com/)
   *
   * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.txt file in the root directory of this source tree.
   */
  
  import webpack from 'webpack';
  import webpackConfig from './webpack.config';
  
  /**
   * Creates application bundles from the source files.
   */
  function bundle() {
    return new Promise((resolve, reject) => {
      webpack(webpackConfig).run((err, stats) => {
        if (err) {
          return reject(err);
        }
  
        console.info(stats.toString(webpackConfig[0].stats));
        if (stats.hasErrors()) {
          return reject(new Error('Webpack compilation errors'));
        }
  
        return resolve();
      });
    });
  }
  
  export default bundle;
  
subject: Abort build when there are compilation errors (#1495)