-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
tsup.config.ts
51 lines (49 loc) · 994 Bytes
/
tsup.config.ts
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
import { defineConfig, Options } from "tsup";
const sharedConfig: Options = {
dts: true,
splitting: true,
clean: true,
treeshake: true,
shims: true,
minify: true,
};
export default defineConfig([
{
entry: ["src/index.ts"],
format: ["cjs", "esm"],
...sharedConfig,
platform: "neutral",
name: "MAIN",
},
{
entry: ["src/client.ts"],
format: ["esm"],
...sharedConfig,
platform: "browser",
name: "CLIENT",
},
{
entry: ["src/lib/stream-list-diff/client/worker/web-worker.ts"],
format: ["esm"],
...sharedConfig,
splitting: false,
platform: "browser",
name: "WEB WORKER",
},
{
entry: ["src/server.ts"],
format: ["cjs"],
...sharedConfig,
platform: "node",
name: "SERVER",
},
{
entry: ["src/lib/stream-list-diff/server/worker/node-worker.ts"],
format: ["cjs"],
...sharedConfig,
splitting: false,
shims: false,
platform: "node",
name: "NODEJS WORKER",
},
]);