const fs = require("node:fs"), path = require("node:path"); const esbuild = require( path.resolve( "node_modules/.pnpm", fs.readdirSync("node_modules/.pnpm").find((n) => n.startsWith("esbuild@0.25.")), "node_modules/esbuild", ), ); esbuild .build({ entryPoints: ["services/video-render/server.ts"], outfile: "services/video-render/dist/server.cjs", bundle: true, platform: "node", target: "node22", format: "cjs", }) .catch(() => process.exit(1));