import { OutputOptions , RollupOutput , RollupBuild } from '@balm-core/index' ; const build = async ( bundle , outputOptions ) : Promise < RollupOutput > => { const { output } = await bundle . generate ( outputOptions ) ; for ( const chunkOrAsset of output ) { if ( chunkOrAsset . type === 'asset' ) { BalmJS . logger . debug ( 'rollup bundler - Asset' , chunkOrAsset , { pre : true } ) ; } else { BalmJS . logger . debug ( 'rollup bundler - Chunk' , chunkOrAsset . modules , { pre : true } ) ; } } return await bundle . write ( outputOptions ) ; } ; export default build ;