// Bundle the server into dist/ with esbuild. npm packages stay external and // are installed in the image; our own shared workspace is bundled in. import { build } from 'esbuild'; import { readFileSync } from 'node:fs'; const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8')); const external = Object.keys(pkg.dependencies).filter((name) => name !== '@spendlight/shared'); await build({ entryPoints: ['src/index.ts', 'src/cli.ts'], outdir: 'dist', bundle: true, platform: 'node', format: 'esm', target: 'node24', sourcemap: true, external, logLevel: 'info', });