-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
48 lines (47 loc) · 1.15 KB
/
Copy pathtsup.config.ts
File metadata and controls
48 lines (47 loc) · 1.15 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { defineConfig } from "tsup";
export default defineConfig([
{
entry: {
index: "src/index.ts",
"core/index": "src/core/index.ts",
"react/index": "src/react/index.ts",
"vue/index": "src/vue/index.ts",
"web-component/index": "src/web-component/index.ts",
"server/index": "src/server/index.ts",
"next/index": "src/next/index.ts",
"hono/index": "src/hono/index.ts",
"mcp/index": "src/mcp/index.ts",
},
format: ["esm", "cjs"],
dts: true,
splitting: false,
clean: true,
// `next` and `hono` are `import type`-only in src/**; mark as external so the build does not
// require them at compile time. Consumers with the framework installed resolve the types.
external: [
"react",
"react-dom",
"vue",
"svelte",
"ioredis",
"@opentelemetry/api",
"next",
"next/server",
"hono",
],
treeshake: true,
sourcemap: true,
},
{
entry: {
"cli/index": "src/cli/index.ts",
},
format: ["cjs"],
splitting: false,
clean: false,
treeshake: true,
banner: {
js: "#!/usr/bin/env node",
},
},
]);