forked from serverlessworkflow/sdk-typescript
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtsdown.config.mjs
More file actions
45 lines (43 loc) · 878 Bytes
/
Copy pathtsdown.config.mjs
File metadata and controls
45 lines (43 loc) · 878 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
import { defineConfig } from 'tsdown';
const sharedConfig = {
entry: ['src/index.ts'],
outDir: 'dist',
platform: 'neutral',
sourcemap: true,
fixedExtension: true,
hash: false,
report: false,
};
export default defineConfig([
{
...sharedConfig,
format: ['esm', 'cjs'],
dts: true,
},
{
...sharedConfig,
format: ['umd'],
platform: 'browser',
globalName: 'serverWorkflowSdk',
dts: false,
deps: {
alwaysBundle: [/^ajv(?:\/.*)?$/, /^ajv-formats$/, /^js-yaml$/],
onlyBundle: false,
},
},
{
...sharedConfig,
format: ['umd'],
platform: 'browser',
globalName: 'serverWorkflowSdk',
dts: false,
minify: true,
deps: {
alwaysBundle: [/^ajv(?:\/.*)?$/, /^ajv-formats$/, /^js-yaml$/],
onlyBundle: false,
},
outExtensions: () => ({
js: '.min.js',
}),
},
]);