code: function(tag, compile, cb) {
    return new Promise(function(resolve, reject) {
      compile.run((err, stats) => {
        if (err) {
          console.error(err)
          return reject(err)
        }
  
        console.log(
          tag,
          stats.toString({
            chunks: false, // Makes the build much quieter
            colors: true
          })
        )
  
        resolve(stats)
        if (cb) {
          cb(stats)
        }
      })
    })
  }
docs: 执行webpack编译
  @param compile
  @param cb
  @returns {Promise}