-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
61 lines (60 loc) · 1.67 KB
/
tsup.config.ts
File metadata and controls
61 lines (60 loc) · 1.67 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
import { defineConfig } from 'tsup'
export default defineConfig({
entry: {
index: 'src/index.ts',
'core/index': 'src/core/index.ts',
'guards/index': 'src/guards/index.ts',
'object/index': 'src/object/index.ts',
'async/index': 'src/async/index.ts',
'collection/index': 'src/collection/index.ts',
'input/index': 'src/input/index.ts',
'flow/index': 'src/flow/index.ts',
'dx/index': 'src/dx/index.ts',
'typed/index': 'src/typed/index.ts',
'string/index': 'src/string/index.ts',
'fn/index': 'src/fn/index.ts',
'math/index': 'src/math/index.ts',
'result/index': 'src/result/index.ts',
'iterator/index': 'src/iterator/index.ts',
'decorator/index': 'src/decorator/index.ts',
'logic/index': 'src/logic/index.ts',
'narrowing/index': 'src/narrowing/index.ts',
'schema/index': 'src/schema/index.ts',
'dom/index': 'src/dom/index.ts',
'storage/index': 'src/storage/index.ts',
'color/index': 'src/color/index.ts',
'http/index': 'src/http/index.ts',
'datetime/index': 'src/datetime/index.ts',
'path/index': 'src/path/index.ts',
'encrypt/index': 'src/encrypt/index.ts',
},
format: ['cjs', 'esm'],
dts: true,
splitting: true,
sourcemap: false,
clean: true,
treeshake: {
preset: 'smallest',
moduleSideEffects: false,
},
minify: 'terser',
minifyWhitespace: true,
minifyIdentifiers: true,
minifySyntax: true,
terserOptions: {
compress: {
passes: 2,
pure_getters: true,
unsafe: true,
unsafe_comps: true,
unsafe_math: true,
unsafe_methods: true,
},
mangle: {
properties: false,
},
format: {
comments: false,
},
},
})