scripts/build/bundler.js/runWebpack
function runWebpack(config) {
  return new Promise((resolve, reject) => {
    webpack(config, (error, stats) => {
      if (error) {
        reject(error);
        return;
      }

      if (stats.hasErrors()) {
        const { errors } = stats.toJson();
        const error = new Error(errors[0].message);
        error.errors = errors;
        reject(error);
        return;
      }

      if (stats.hasWarnings()) {
        const { warnings } = stats.toJson();
        console.warn(warnings);
      }

      resolve();
    });
  });
}