code: async function bundle(opts: *) {
    const directory = process.cwd();
    const configPath = getWebpackConfig(directory, opts.config);
  
    const [
      configs,
      availablePlatforms,
    ] = makeReactQMLConfig(
      // $FlowFixMe: Dynamic require
      require(configPath),
      {
        root: directory,
        dev: opts.dev,
        minify: opts.minify,
        bundle: true,
      }
    );
  
    const config = configs[availablePlatforms.indexOf(opts.platform)];
  
    if (opts.assetsDest) {
      config.output.path = path.isAbsolute(opts.assetsDest)
        ? opts.assetsDest
        : path.join(directory, opts.assetsDest);
    }
  
    if (opts.bundleOutput) {
      config.output.filename = path.isAbsolute(opts.bundleOutput)
        ? path.relative(config.output.path, opts.bundleOutput)
        : path.relative(
            config.output.path,
            path.join(directory, opts.bundleOutput)
          );
    }
  
    const compiler = webpack(config);
  
    logger.info(
      messages.initialBundleInformation({
        entry: config.entry,
        dev: opts.dev,
      })
    );
  
    const stats = await new Promise((resolve, reject) =>
      compiler.run((err, info) => {
        if (err || info.hasErrors()) {
          reject(
            new MessageError(
              messages.bundleFailed({
                errors: err
                  ? [err.message]
                  : info.toJson({ errorDetails: true }).errors,
              })
            )
          );
        } else {
          resolve(info);
        }
      })
    );
  
    clear();
  
    logger.done(
      messages.bundleBuilt({
        stats,
        platform: opts.platform,
        assetsPath: config.output.path,
        bundlePath: config.output.filename,
      })
    );
  }
docs: Bundles your application code