built app-bridge w/ mcp sdk as external

This commit is contained in:
ochafik 2025-11-21 22:00:47 +00:00
commit c59732c4db

View file

@ -7,7 +7,7 @@ await $`tsc`;
const isDevelopment = Bun.env.NODE_ENV === "development";
// Build all JavaScript/TypeScript files
function buildJs(entrypoint: string, opts: Record<string, string> = {}) {
function buildJs(entrypoint: string, opts: Record<string, any> = {}) {
return Bun.build({
entrypoints: [entrypoint],
outdir: "dist",
@ -22,6 +22,6 @@ function buildJs(entrypoint: string, opts: Record<string, string> = {}) {
await Promise.all([
buildJs("src/app.ts", { outdir: "dist/src" }),
buildJs("src/app-bridge.ts", { outdir: "dist/src" }),
buildJs("src/app-bridge.ts", { outdir: "dist/src", external: ["@modelcontextprotocol/sdk"] }),
buildJs("src/react/index.tsx", { outdir: "dist/src/react" }),
])