-
Notifications
You must be signed in to change notification settings - Fork 332
Expand file tree
/
Copy pathtsup.config.ts
More file actions
31 lines (30 loc) · 1012 Bytes
/
Copy pathtsup.config.ts
File metadata and controls
31 lines (30 loc) · 1012 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
28
29
30
31
import { defineConfig } from 'tsup';
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm'],
target: 'node24',
platform: 'node',
outDir: 'dist',
clean: true,
sourcemap: true,
dts: false,
// Bundle all dependencies into a single self-contained file so the packaged
// Electron app can run the MCP server without a node_modules tree.
noExternal: [/.*/],
splitting: false,
// Provide a real `require` function for CJS dependencies (e.g. undici)
// that use require() for Node built-in modules.
banner: {
js: `import { createRequire as __bundled_createRequire } from 'module';\nconst require = __bundled_createRequire(import.meta.url);`,
},
esbuildOptions(options) {
// Optional peer deps of xsschema (pulled in by fastmcp) — we only use zod.
// Mark as external at the esbuild level to avoid resolution errors.
options.external = [
...(options.external ?? []),
'sury',
'@valibot/to-json-schema',
'effect',
];
},
});