const path = require("node:path"); // esbuild is a locked dependency of Vite, not a top-level pnpm binary. // Resolve it through Vite instead of downloading a second, unpinned copy. const viteDirectory = path.dirname(require.resolve("vite/package.json")); const esbuild = require(require.resolve("esbuild", { paths: [viteDirectory] })); const output = process.argv[2] || path.join(__dirname, "hf-bootstrap-owner.cjs"); esbuild.buildSync({ entryPoints: [path.join(__dirname, "hf-bootstrap-owner-cli.mjs")], bundle: true, platform: "node", format: "cjs", external: ["../src/generated/prisma/index.js"], outfile: output, }); console.info("Owner bootstrap bundle built.");