forked from puppeteer/replay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.ts
45 lines (44 loc) · 871 Bytes
/
rollup.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import typescript from '@rollup/plugin-typescript';
import dts from 'rollup-plugin-dts';
export default [
{
input: 'src/main.ts',
output: [
{
file: 'lib/main.js',
format: 'es',
},
{
file: 'lib/cjs/main.cjs',
format: 'cjs',
},
],
plugins: [typescript()],
},
{
input: 'src/main.ts',
output: {
file: 'lib/main.d.ts',
format: 'es',
},
external: [
'devtools-protocol',
'devtools-protocol/types/protocol-mapping.js',
],
plugins: [
dts({
compilerOptions: { declaration: true },
}),
],
},
{
input: 'src/cli.ts',
output: {
file: 'lib/cli.js',
format: 'es',
banner: '#!/usr/bin/env node',
},
external: ['../lib/main.js'],
plugins: [typescript({ tsconfig: 'tsconfig.cli.json' })],
},
];