-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
49 lines (47 loc) · 971 Bytes
/
tsup.config.ts
File metadata and controls
49 lines (47 loc) · 971 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { defineConfig } from 'tsup';
const shared = {
outDir: 'dist',
format: ['esm'],
target: 'esnext',
splitting: false,
sourcemap: true,
clean: true,
external: [
'bun:sqlite',
'bun:test',
],
noExternal: [
'@opencode-ai/plugin',
'commander',
'cron-parser',
'drizzle-orm',
'glob',
'hono',
],
alias: {
'@core': './src/core',
'@worker': './src/worker',
'@web': './src/web',
'@plugin': './plugin',
'@gateway': './src/gateway',
'@daemon': './src/daemon',
},
};
export default defineConfig([
{
...shared,
entry: { 'cli/index': 'src/cli/index.ts' },
banner: { js: '#!/usr/bin/env bun\n' },
dts: { resolve: true },
},
{
...shared,
entry: {
'gateway/index': 'src/gateway/index.ts',
'web/index': 'src/web/index.tsx',
'plugin/supertask': 'plugin/supertask.ts',
'worker/index': 'src/worker/index.ts',
},
dts: { resolve: true },
},
]);