-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsup.config.ts
31 lines (30 loc) · 879 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
import { defineConfig } from 'tsup'
export default defineConfig(
[
{
name: 'CLI',
entry: ['./src/cli.ts'],
format: 'esm',
outDir: './dist',
bundle: true,
external: ['@resvg/resvg-js'],
outExtension: ({ format }) =>
({ js: format === 'esm' ? '.mjs' : '.cjs' }),
},
{
entry: { index: './src/resvg-js/index.ts' },
format: ['cjs', 'esm'],
outDir: './dist',
bundle: true,
external: ['@resvg/resvg-js'],
outExtension: ({ format }) =>
({ js: format === 'esm' ? '.mjs' : '.cjs' }),
},
{
entry: { index: './src/resvg-js/index.ts' },
format: 'esm',
outDir: './dist',
dts: { only: true },
},
],
)