Open History to see the last commit
1/**
2 * Copies the built web app into dist/client/ so the published npm package
3 * includes the web UI. This runs as a post-build step.
4 */
5import * as fs from "node:fs";
6import * as path from "node:path";
7
8const webDist = path.resolve(import.meta.dirname, "../../web/dist");
9const target = path.resolve(import.meta.dirname, "../dist/client");
10
11if (!fs.existsSync(webDist)) {
12 console.log(
13 "⚠ Web dist not found — skipping client bundle. Run `bun run --cwd apps/web build` first.",
14 );
15 process.exit(0);
16}
17
18fs.cpSync(webDist, target, { recursive: true });
19console.log("✓ Bundled web app into dist/client");