-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtsdown.config.ts
More file actions
49 lines (43 loc) · 915 Bytes
/
Copy pathtsdown.config.ts
File metadata and controls
49 lines (43 loc) · 915 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 "tsdown";
const isDev = process.env.NODE_ENV === "development";
const config = isDev
? defineConfig({
entry: "C5Ren.ts",
platform: "browser",
format: "umd",
outputOptions: {
name: "C5Ren",
},
watch: true,
outDir: "dist",
noExternal: ["canvas"],
})
: defineConfig([
{
entry: "C5Ren.ts",
platform: "browser",
format: {
esm: {
minify: false,
},
umd: {
minify: true,
},
},
outputOptions: {
name: "C5Ren",
},
outDir: "dist",
noExternal: ["canvas"],
},
{
entry: "C5Ren.ts",
platform: "node",
format: "commonjs",
outputOptions: {
name: "C5Ren",
},
outDir: "dist-node",
},
]);
export default config;