-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
70 lines (69 loc) · 1.25 KB
/
Copy pathtsup.config.ts
File metadata and controls
70 lines (69 loc) · 1.25 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { defineConfig } from 'tsup'
export default defineConfig([
// Browser entry points (index + next)
{
entry: {
index: 'src/index.ts',
next: 'src/next.ts',
},
format: ['esm'],
dts: true,
splitting: true,
sourcemap: true,
clean: true,
target: 'es2020',
platform: 'browser',
banner: { js: '"use client";' },
external: [
'react',
'react-dom',
'react/jsx-runtime',
'ink',
'ink-web',
'ink-web/next',
'xterm',
'zod',
'fs',
'path',
'events',
/^node:/,
],
},
// Node entry point (FsStorageAdapter)
{
entry: { node: 'src/node.ts' },
format: ['esm'],
dts: true,
sourcemap: true,
clean: false,
target: 'node18',
platform: 'node',
external: [
'react',
'react-dom',
'react/jsx-runtime',
'ink',
'ink-web',
'zod',
],
},
// CLI entry point
{
entry: { cli: 'src/cli.ts' },
format: ['esm'],
dts: false,
sourcemap: true,
clean: false,
target: 'node18',
platform: 'node',
banner: { js: '#!/usr/bin/env node' },
external: [
'react',
'react-dom',
'react/jsx-runtime',
'ink',
'ink-web',
'zod',
],
},
])