import { dts } from '@dtsx/bun' import { frameworkExternal, intro, outro } from '../build/src' const { startTime } = await intro({ dir: import.meta.dir, }) const result = await Bun.build({ entrypoints: ['./src/index.ts'], outdir: './dist', format: 'esm', target: 'bun', minify: true, external: frameworkExternal(), plugins: [ dts({ root: './src', outdir: './dist', }), ], }) // The bar itself: one self-contained script for the browser, served from // `/__debugbar/assets/debugbar.js`. Built beside the server bundle so the // published package never compiles anything at request time. const client = await Bun.build({ entrypoints: ['./src/client/index.ts'], outdir: './dist/client', naming: 'debugbar.js', format: 'iife', target: 'browser', minify: true, }) if (!client.success) throw new AggregateError(client.logs, 'The debugbar client bundle failed to build.') await outro({ dir: import.meta.dir, startTime, result, })