import { copyFileSync } from "node:fs"; import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; import { defineConfig } from "tsup"; export default defineConfig({ entry: ["src/server.ts"], format: ["esm"], dts: true, async onSuccess() { const root = join(dirname(fileURLToPath(import.meta.url)), "../.."); copyFileSync( join(root, "workers/health-probe/src/index.mjs"), join(dirname(fileURLToPath(import.meta.url)), "dist/health-probe-worker.mjs"), ); }, });