spb/market-atlas
Public
TypeScript 96.7%
SQL 1.6%
CSS 0.8%
JavaScript 0.5%
1// Bundles the API (and the workspace packages it imports) into dist/ with esbuild.2// Third-party dependencies stay external (resolved from node_modules at runtime).3import { build } from "esbuild";4import { readFileSync } from "node:fs";56const pkg = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8"));7const external = Object.keys(pkg.dependencies).filter((d) => !d.startsWith("@market-atlas/"));89await build({10 entryPoints: ["src/main.ts", "src/cli.ts"],11 outdir: "dist",12 bundle: true,13 platform: "node",14 format: "esm",15 target: "node22",16 sourcemap: true,17 external,18 logLevel: "info",19 banner: {20 js: "import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);",21 },22});23