-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrollup.config.js
50 lines (48 loc) · 1.33 KB
/
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
import resolve from 'rollup-plugin-node-resolve'
import {terser} from 'rollup-plugin-terser'
import strip from 'rollup-plugin-strip'
const output = (input, file, format, plugins) => ({
input,
output: {
name: 'shamosHoey',
file,
format,
exports: 'default'
},
plugins
})
export default [
output('./src/main.js', './dist/shamosHoey.js', 'umd', [
strip({
functions: ['debugEventAndSegment', 'debugEventAndSegments']
}),
resolve()
]),
output('./src/main.js', './dist/shamosHoey.min.js', 'umd', [
strip({
functions: ['debugEventAndSegment', 'debugEventAndSegments']
}),
resolve(),
terser()
]),
output('./src/main.js', './dist/shamosHoey.esm.js', 'esm', [
strip({
functions: ['debugEventAndSegment', 'debugEventAndSegments']
}),
resolve()
]),
output('./src/ShamosHoey.js', './dist/ShamosHoeyClass.js', 'umd', [
strip({
functions: ['debugEventAndSegment', 'debugEventAndSegments']
}),
resolve(),
terser()
]),
output('./src/ShamosHoey.js', './dist/ShamosHoeyClass.esm.js', 'esm', [
strip({
functions: ['debugEventAndSegment', 'debugEventAndSegments']
}),
resolve(),
terser()
])
]