-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsdown.mcpb.config.ts
More file actions
27 lines (26 loc) · 974 Bytes
/
Copy pathtsdown.mcpb.config.ts
File metadata and controls
27 lines (26 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { defineConfig } from "tsdown";
// Self-contained build for the .mcpb bundle: inline all dependencies into a
// single ESM file under mcpb-build/server/ so it runs under Claude Desktop's
// bundled Node runtime without a node_modules folder.
//
// Express is intentionally left external: stdio mode never imports it (see
// src/index.ts, where it is a dynamic import inside the HTTP branch), so it is
// dead code for the bundle. Excluding it keeps the bundle small and avoids
// bundling Express's CommonJS internals.
//
// Target node20 (conservative) because the runtime version Claude Desktop
// ships is not pinned; package.json's engines ">=26" is stricter than the code
// actually needs.
export default defineConfig({
entry: ["src/index.ts"],
format: "esm",
platform: "node",
target: "node20",
outDir: "mcpb-build/server",
fixedExtension: false,
noExternal: [/.*/],
external: ["express"],
dts: false,
sourcemap: false,
clean: true,
});