code: function compile(config) {
    return new Promise((resolve, reject) => {
      let compiler;
      try {
        compiler = webpack(config);
      } catch (e) {
        console.log('compile errors:', [e]); // eslint-disable-line
        reject(e);
        process.exit(1);
      }
      compiler.run((err, stats) => {
        err ? reject(err) : resolve(stats);
      });
    });
  }
docs: Wrap webpack compile in a try catch.