File size: 683 Bytes
689359a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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.");
|