forked from thezedwards/autoconsent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
54 lines (53 loc) · 922 Bytes
/
rollup.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import typescript from '@rollup/plugin-typescript';
import pkg from './package.json';
export default [{
input: './lib/node.ts',
output: [{
file: 'dist/autoconsent.puppet.js',
format: 'cjs'
}],
plugins: [
typescript(),
]
}, {
input: './lib/web.ts',
output: [{
file: pkg.module,
format: 'es',
globals: ['browser'],
}, {
file: pkg.main,
format: 'cjs',
}],
plugins: [
typescript(),
]
}, {
input: './addon/background.ts',
output: [{
file: './addon/background.bundle.js',
format: 'iife',
}],
plugins: [
typescript(),
]
}, {
input: './addon/content.ts',
output: [{
file: './addon/content.bundle.js',
format: 'iife',
}],
plugins: [
typescript(),
]
}, {
input: './addon/test.ts',
output: [{
file: './addon/test.bundle.js',
format: 'iife',
external: ['chai', 'mocha']
}],
plugins: [
typescript(),
]
}];