-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathtsup.config-package.ts
More file actions
42 lines (40 loc) · 908 Bytes
/
tsup.config-package.ts
File metadata and controls
42 lines (40 loc) · 908 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
import { defineConfig, type Options } from 'tsup';
const baseConfig: Options = {
clean: true,
dts: true,
minify: false,
skipNodeModulesBundle: true,
sourcemap: true,
target: 'es2020',
tsconfig: './tsconfig.package.json',
keepNames: true,
treeshake: true
};
export default [
defineConfig({
...baseConfig,
outDir: 'dist/codegen/cjs',
format: 'cjs',
entry: ['codegen/graphql-pokemon.ts']
}),
defineConfig({
...baseConfig,
outDir: 'dist/codegen/esm',
format: 'esm',
entry: ['codegen/graphql-pokemon.ts'],
outExtension: () => ({ js: '.mjs' })
}),
defineConfig({
...baseConfig,
outDir: 'dist/utilities/cjs',
format: 'cjs',
entry: ['utilities/index.ts']
}),
defineConfig({
...baseConfig,
outDir: 'dist/utilities/esm',
format: 'esm',
entry: ['utilities/index.ts'],
outExtension: () => ({ js: '.mjs' })
})
];