-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrollup.config.ts
More file actions
43 lines (42 loc) · 841 Bytes
/
rollup.config.ts
File metadata and controls
43 lines (42 loc) · 841 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
import cleanup from 'rollup-plugin-cleanup';
import dts from 'rollup-plugin-dts';
import typescript from '@rollup/plugin-typescript';
export default [
{
input: 'src/index.ts',
external: ['axios', 'p-limit'],
output: [
{
file: 'dist/esm/index.mjs',
format: 'esm',
generatedCode: {
constBindings: true,
},
exports: 'named',
},
{
file: 'dist/cjs/index.cjs',
format: 'cjs',
exports: 'named',
},
],
plugins: [
typescript(),
cleanup({
comments: 'none',
extensions: '.ts',
}),
],
},
{
input: 'src/index.ts',
external: ['axios', 'p-limit'],
output: [
{
file: 'dist/types.d.ts',
format: 'es',
},
],
plugins: [typescript(), dts()],
},
];