getCode = async (bundle, outputOptions, allFiles = false) => {
  const { output } = await bundle.generate(outputOptions || { format: 'cjs', exports: 'auto' });

  if (allFiles) {
    return output.map(({ code, fileName, source, map }) => {
      return {
        code,
        fileName,
        source,
        map
      };
    });
  }
  const [{ code }] = output;
  return code;
}
@param {import('rollup').RollupBuild} bundle
@param {import('rollup').OutputOptions} [outputOptions]