Files
paperclip-stats-plugin/esbuild.config.mjs
T
founding-engineer-bot 40529c5991 feat: initial miq.stats-plugin implementation
Operating-numbers view plugin (MIQ-1734): per-agent load, in-flight
per project, pending-decision age, 7-day throughput, and budget tile.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-27 04:00:59 +02:00

18 lines
773 B
JavaScript

import esbuild from "esbuild";
import { createPluginBundlerPresets } from "@paperclipai/plugin-sdk/bundlers";
const presets = createPluginBundlerPresets({ uiEntry: "src/ui/index.tsx" });
const watch = process.argv.includes("--watch");
const workerCtx = await esbuild.context(presets.esbuild.worker);
const manifestCtx = await esbuild.context(presets.esbuild.manifest);
const uiCtx = await esbuild.context(presets.esbuild.ui);
if (watch) {
await Promise.all([workerCtx.watch(), manifestCtx.watch(), uiCtx.watch()]);
console.log("esbuild watch mode enabled for worker, manifest, and ui");
} else {
await Promise.all([workerCtx.rebuild(), manifestCtx.rebuild(), uiCtx.rebuild()]);
await Promise.all([workerCtx.dispose(), manifestCtx.dispose(), uiCtx.dispose()]);
}