scripts/build/bundler.js/createBundle
module.exports = async function createBundle(bundle, cache, options) {
  const inputOptions = getRollupConfig(bundle);
  const outputOptions = getRollupOutputOptions(bundle, options);

  if (!Array.isArray(outputOptions) && outputOptions.skipped) {
    return { skipped: true };
  }

  const checkCacheResults = await Promise.all(
    outputOptions.map((outputOption) =>
      checkCache(cache, inputOptions, outputOption)
    )
  );
  if (checkCacheResults.every((r) => r === true)) {
    return { cached: true };
  }

  if (bundle.bundler === "webpack") {
    await runWebpack(getWebpackConfig(bundle));
  } else {
    const result = await rollup(inputOptions);
    await Promise.all(outputOptions.map((option) => result.write(option)));
  }

  return { bundled: true };
};