forked from chromaui/chromatic-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
34 lines (33 loc) · 759 Bytes
/
tsup.config.ts
File metadata and controls
34 lines (33 loc) · 759 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
import { defineConfig } from 'tsup';
export default defineConfig((options) => [
{
entry: {
bin: 'bin-src/register.js',
node: 'node-src/index.ts',
},
splitting: true,
minify: !options.watch,
format: ['cjs'],
dts: {
entry: { node: 'node-src/index.ts' },
resolve: true,
},
treeshake: true,
sourcemap: false,
clean: true,
platform: 'node',
target: 'node16', // Storybook still supports Node 16
},
{
entry: ['action-src/register.js'],
outDir: 'action',
splitting: false,
minify: !options.watch,
format: ['cjs'],
treeshake: true,
sourcemap: false,
clean: true,
platform: 'node',
target: 'node20', // Sync with `runs.using` in action.yml
},
]);