-
Notifications
You must be signed in to change notification settings - Fork 3
/
tsup.config.js
36 lines (35 loc) · 926 Bytes
/
tsup.config.js
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
import { defineConfig } from 'tsup';
import { dependencies, peerDependencies } from './package.json';
export default defineConfig({
entry: [
'./src/index.ts',
'./src/constants.ts',
'./src/abi/index.ts',
'./src/entities/index.ts',
'./src/entities/assets/index.ts',
'./src/entities/contracts/index.ts',
'./src/entities/options/index.ts',
'./src/entities/trader/index.ts',
'./src/lib/index.ts',
'./src/lib/grpc/index.ts',
'./src/lib/subgraph/index.ts',
'./src/utils/index.ts',
],
format: ['esm'],
platform: 'neutral',
target: 'es2021',
clean: true,
bundle: true,
splitting: true,
dts: true,
treeshake: true,
sourcemap: 'inline',
shims: true,
outExtension({ format }) {
return {
js: `.${format === 'esm' ? 'm' : 'c'}js`,
dts: `.${format}.d.ts`,
};
},
external: [...Object.keys(dependencies), ...Object.keys(peerDependencies)],
});