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

  const useCache = await cache.checkBundle(
    bundle.output,
    inputOptions,
    outputOptions
  );
  if (useCache) {
    try {
      await execa("cp", [
        path.join(cache.cacheDir, "files", bundle.output),
        "dist",
      ]);
      return { cached: true };
    } catch (err) {
      // Proceed to build
    }
  }

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

  return { bundled: true };
};